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
How to convert a string to a number using javascript?
How do you access an element in an HTML document with JavaScript?
Explain higher-order functions in javascript?
What does a typeof operator do?
Text from your clipboard?
What are javascript properties?
What are the predefined functions in javascript?
What is the difference between == and ===? Which one would you use?
What is the default scope in javascript?
How to remove the event listener?
What is dhtml in javascript?
What is scope chain in javascript?
What is the use of spread operator?
What is webassembly good for?
What is the output of 10+20+”30″ in JavaScript?