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

How to capture the Image width and height using QTP script ? Kindly answer plz.... Thanx in adavance...

3607


What does clean white space mean?

453


What does double mean in javascript?

529


How to print a web page using javascript?

505


Which built-in method returns the character at the specified index?

728






Can array in javascript be extended?

482


What are exports & imports?

476


Which companies are using node js?

435


What is array constructor in javascript?

497


What does three dots mean in texting?

492


How to change video files randomly after completing its execution in Javascript?

1860


List few difference between java and javascript?

497


How to write a hello world example of javascript?

482


How do you check if a value is a number in javascript?

482


To write messages to the screen without using "document.write()"?

465