Difference between JavaScript and Java

Diffence between JavaScript and java:-

JavScript and Java are two completely different programming language in both concept and design.

JavaScript:-

  1. JavaScript is invented by "Brendan Eich".
  2. It is a scripting programming language and its official name is 'ECMA-262'. It viewed on the 'Netscape' browser (i.e. no longer used browser) in 1995 at the first time,but later on ,it has been adopted by 'ECMA' (a standard browser) in 1997.
  3. JavaScript is an Object -Oriented Language, but it doesn't still use classes and create objects from these classes unlike other languages.Thus it is prototype based language ,not class based .
  4. JavaScript isn't a typed language.Due to this, it can be defined only 'one type of Number' that can be written either with or without decimal symbol.
    eg. var pi=3.14 // A number with decimal
    var x=36 // A number without decimal
    In case of extra large or extra small number you can be written these numbers using exponential(scientific symbol) as given in example:-
    eg. var x=136e6 //means 136000000
    var y=136e-6 //means 0.000136

Java:-

  1. Java is invented by "Sun Microsytsems" and designed by 'James Gosling'.
  2. It is more complex OOP based programming language and come in same catagory as 'C' language.Its first name is "Oak".
  3. Java is a such Object Oriented Language in which we can define a number of classes and create a number of objects from these classes as well as instances of these objects.Java is class based language.
  4. Unlike JavaScript, it can define 'different types of Numbers' like Integer, Short, Long and Floating-Point number etc.
    eg Int var x;  //an integer variable

  5.  
Ebook Download
View all
Learn
View all