What is difference between the java and javascript?


What is difference between the java and javascript?

What is difference between the java and javascript?
1 Answer(s)      7 years ago
Posted in : Java Interview Questions

What is the difference beteen the java and javascript?

View Answers

October 28, 2010 at 10:44 AM

Hello Friend,


1) Java is a Object Oriented programming language developed by Sun Microsystems, while JavaScript is a scripting language that was introduced by Netscape.

2) Java creates applications that run in a virtual machine while JavaScript code is run on a browser only.

3) Java code needs to be compiled while JavaScript code are all in text.

4) Java can only be used as a back-end language within a web environment while Javascript is used for front-end web development.

5) Java follows strong type checking where as Javascript is very flexible in datatype(loosly typed). Ex : Variables in Java: int num;String st; Variables in Javascript: var name;

6) Java support function declarations, with accessibility specifiers,parameter datatype,return type while Javascript does not.

Ex: function declaration in java:
    public int functionName(int no){

    function declaration in javascript:
    function fcnName(str){



Related Tutorials/Questions & Answers: