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 is the dollar sign in javascript?
what is the difference between window & document in javascript?
Can array in javascript be extended?
How can javascript be used to personalize or tailor a web site to fit individual users?
How to create a function using function constructor?
Is a parabola a function?
How can you to add javascript to a page when performing an asynchronous postback?
Explain the role of deferred scripts in javascript?
Where are cookies actually stored on the hard disk?
What are the main uses of javascript?
Is a function an object?
How to detect the OS on the client machine in JavaScript?
Name some of the JavaScript features?
Explain hoisting in javascript?
What is unobtrusive javascript?