What is the difference between Java and JavaScript?


JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow a client-side script to interact with the user and make dynamic pages.

JavaScript do not create stand-alone applications. JavaScript is implemented using JavaScript statements that are placed within the <script>... </script>.


Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as a core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).

Here are the differences:

  • The JavaScript programming language is developed by Netscape, Inc and not part of the Java platform.
  • Java applications are run in a virtual machine or web browser while JavaScript is run on a web browser.
  • Java code is compiled whereas while JavaScript code is in text and in a web page.
  • JavaScript is an OOP scripting language, whereas Java is an OOP programming language.