• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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!
 
Sheriff
Posts: 23451
46
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.
 
lowercase baba
Bartender
Posts: 12613
50
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.
 
Marshal
Posts: 58304
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
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.
 
Author and ninkuma
Marshal
Posts: 66532
160
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: 66532
160
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
 
Java Cowboy
Sheriff
Posts: 16082
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.
 
author
Marshal
Posts: 23435
138
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
 
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
 
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: 66532
160
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: 58304
178
  • 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
 
Saloon Keeper
Posts: 8580
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I on the other hand think ham is cute but useless.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!