• Post Reply Bookmark Topic Watch Topic
  • New Topic

Brand New To Java, what is the difference between JavaScript and Java?  RSS feed

 
Colin Geslin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hear these two things used interchangeably a lot and am wondering what the innate differences are and if someone can explain. Thanks!
 
Paul Clapham
Sheriff
Posts: 22813
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's like asking "What's the difference between French and Spanish". It's true that people use them interchangeably, but that's because those people are ignorant. They are different languages with similar names.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12562
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is to javascript as ham is to hamster.

The first few letters of the latter contain the former, but that's about it.
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
AbdulRab Khan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both are totally different languages used to serve different purposes.

Java: It is an object oriented programming language with some of the features same as C++, it is a very powerful language which can be used to develop any kind of application (standalone, mobile, web application etc). Java applications runs on a special software known as JVM (Java virtual machine).

Java Script: It is a scripting language which is mainly used for client side validations, and runs on the browser, and it is always embedded under HTML.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66304
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AbdulRab Khan wrote:Java Script: It is a scripting language which is mainly used for client side validations, and runs on the browser, and it is always embedded under HTML.

JavaScript is used for much much more than just validations in the browsers. And it is not "always embedded under HTML". Server-side JavaScript is also taking hold.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66304
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To illustrate fred's point:
 
AbdulRab Khan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear Bibeault for providing some more information related to javascript
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As people have already said above, they are two completely different languages, used for different purposes.

Some history: JavaScript was invented by Netscape around 1995. It was first called LiveScript. Java was the new, hip thing around that time, that would revolutionize the Web because you could program applets in Java. Netscape renamed LiveScript to JavaScript to take advantage of the coolness factor of the name Java (they did this with permission from Sun) - even though the two languages had almost nothing to do with each other. Java applets never became a big hit.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:As people have already said above, they are two completely different languages, used for different purposes.

Some history: JavaScript was invented by Netscape around 1995. It was first called LiveScript. Java was the new, hip thing around that time, that would revolutionize the Web because you could program applets in Java. Netscape renamed LiveScript to JavaScript to take advantage of the coolness factor of the name Java (they did this with permission from Sun) - even though the two languages had almost nothing to do with each other. Java applets never became a big hit.


I believe Sun gave more than just permission to Netscape. Many of the engineers, including Bill Joy himself, helped with the Javascript specification -- to enhance the design of LiveScript to be more Java-like.

Henry
 
rohit chavan
Ranch Hand
Posts: 133
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Ranch, the basic difference between javascript and java is one is scripting language and another is programming language. and with the help of above posts, the history is in front of you
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Java is to Javascript as ham is to hamster"

As in one is tasty and filling and the other is cute and useless? :p
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66304
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you think that JavaScript is cute and useless, you need to get out more.
 
rohit chavan
Ranch Hand
Posts: 133
Hibernate Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be you are talking about hamster, rather than javascript, when you say cute and useless you should get out more!!
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just glad no one thought I was referring to the hamster as "tasty and filling"
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayesh A Lalwani wrote:I'm just glad no one thought I was referring to the hamster as "tasty and filling"
I did
 
Stephan van Hulst
Saloon Keeper
Posts: 7961
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I on the other hand think ham is cute but useless.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!