What is the difference between java and java script?

Answer Posted / nazrul

1.Java is an OOP programming language while Java Script is
an OOP scripting language.

2.Java creates applications that run in a virtual machine or
browser 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 follows strong type checking where as Javascript is
very flexible in datatype(loosly typed). Supports types
which represents boolean,int,string

o Ex : Variables in Java is declared as datatype
<varname>; --> int num;
o But in Javascript variable declaration will be as var
<varname>; --> var myName;

5.Javascript support function declarations, but without
accessibility specifiers,parameter datatype,return type
• Javascript : function fcnName(str)
{
........function body..........
}
• Java : public int functionName(int no)
{
..........function body.........
}

Is This Answer Correct ?    32 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where do I put javascript in html?

522


Is a parabola a function?

552


How do you declare javascript?

613


What is node ecosystem?

545


Who is the world famous hacker?

539






What is the difference between window.onload and ondocumentready?

574


Name some of the built-in methods and the values returned by them.

645


What does the "Access is Denied" IE error mean?

764


Explain the term closure?

666


what will happen and why if i will acess the methods of superclass which is declared as private by a object of same subclass.

1650


How to load another html page from javascript?

624


What is a null variable in javascript?

593


What is javascript in simple terms?

583


Which is best for front end?

549


What is a boolean search?

547