Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
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!
 
Marshal
Posts: 24939
61
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
Posts: 12792
51
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: 67412
257
  • 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.
 
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • 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
Posts: 23853
141
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux 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 Oracle Java
  • 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: 2759
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
Marshal
Posts: 67340
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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 Oracle Java
  • 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: 2759
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: 67412
257
  • 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: 11181
244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I on the other hand think ham is cute but useless.
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!