Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions What is difference between the java and javascript?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


What is the difference beteen the java and javascript?


Advertisement
View Answers

October 28, 2010 at 10:44 AM


Hello Friend,

Difference:

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){
     }

Thanks



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com