Difference between Java and JavaScript

Java and JavaScript are not in the same family of languages but have some similarities. They are like two different sides of a coin. Java was written in 1995 and also the most popular language. Which used for software development. That’s why a Front End Development language ECMA-Script, known as JavaScript. To increase its popularity and it’s the backbone of every website.


A Java programming language, developed by “Sun Microsystem” in 1995. Java is an object-oriented programming language and also has a virtual machine platform that allows you to create compiled programs that run on nearly every platform. Java promised, “Write Once, Run Anywhere”.


JavaScript is a lightweight programming language(“scripting language”). Which used to make web pages interactive. It can insert dynamic text into HTML. JavaScript, also known as the browser’s language. JavaScript is not similar or related to Java. Both the languages have a C like a syntax, widely used in client-side Web applications, but there are few similarities only. JavaScript developed by “Netscape”.

Java JavaScript
It is a programming language. It is a scripting language.
Java is a Object-Oriented programming languageJavaScript is Object-Based language.
Java applications can be run on any virtual machine or browserJavaScript code used to run only in browser, but now we also can run it on server via Node.js .
Java is used for Back-end JavaScript is used for Front-end.
It’s a Statically typed languageit is a dynamically typed language
It should be compiled before executionJavaScript needs to be inter=grated into the HTML program for the execution.
Java is a Standalone languageHold within a web page and integrates with its HTML content
Java program uses more memoryit use less memory
Java is one of the complex language to learn JavaScript is one of the easy language to learn
Java stored on the host machine as the “Byte” codeJavaScript stored on the host machine as “source” text.
Java programs are saved with the “.java” extensionJavaScript programs are saved with the “.js” extension.
Java has a thread based approach to concurrencyJavaScript has event based approach to concurrency.
Java was developed by the “Sun Microsystems”JavaScript was developed by the “Netscape”

public class myclass
public static void main(String[] args)
System.out.printIn(“First Java program”)
document.write(“Hello World”);

Recommended Posts:

jQuery Introduction

What is JavaScript?

jQuery – Selector

Structure of Java program




Leave a Comment