Difference between Java and Javascript.

From diff.wiki
What is the difference between Java and JavaScript?

Java is am OOP programming language while JavaScript is an OOP script language. Java creates applications that run in a virtual machine or browser while JavaScript code is run only in browser. Java code needs to be compiled while JavaScript code are all in text form. Java requires more memory while JavaScript requires less memory. Java has thread based approach in concurrency while JavaScript has event based approach to concurrency.


Java is a general purpose, compiled language used for server side programming.it is an independent language executed by using java virtual machine. To code and debug in java you need java development kit and specific IDEs. Java is used for mobile applications development, desktop application development, web servers, embedded systems and much more. Java program uses more memory. It is a class based programming based on the concept of object oriented programming.


JavaScript is an interpreting scripting language, used for client side programming. It must be executed along with HTML in the web browser. JavaScript can be coded by using any text editor. It used for building interactive web applications. It requires less memory. JavaScript objects are prototype based.

Java JavaScript
Example Always compiled Interpreted
Example Mainly used for back end Mainly used for front end
Example Allows better security Needs more effort to enhance security
Example Requires java development kit Can be written in any text
Example Can be used for various apps Can be used for web apps only.

Venn Diagram[edit]

Difference between Java and Javascript.jpg