+ 2
how can we differentiate JavaScript in java?
2 Respuestas
+ 1
There are big differences.
Java is a language that is compiled.
JavaScript is a runtime language.
Java uses classes for everything.
Hello world in both languages:
JavaScript:
alert("Hello World!");
or
document.write("Hello World!");
Java:
public static void main {
system.out.printIn("Hello World!");
}
In Java (Same with CSharp) you need to use Main to print Hello World. Java is an Object Oriented Language, and JavaScript is a functional language (I think).
And... JavaScript is used in the browser. (JavaScript can be used with Unity, but when used with it it's usually called "UnityScript"
) Java is used in the computer itself.
- 1
Java is programming language