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
What are classes in javascript?
What will happen if an infinite while loop is run in Javascript?
What is the difference between registerclientscriptblock and registerstartupscript?
If you need to hide the javascript code from the older browser versions, how will you perform it?
How can we detect os of the client machine using javascript?
What is use strict in javascript?
Can you use javascript to hack?
What does 3 dots mean in javascript?
What is spread operator?
Define closure.
wap to accept an int array frm the user and print the lucky nos.
How to achieve inheritance in javascript?
What are the basic groups of dataypes in JavaScript?
What are the decodeURI() and encodeURI()?
How to use "join()" to create a string from an array using javascript?