Difference Between Java & JavaScript in Tabular Form
Java programming is for applications that are either run from a computer desktop or initiated through a web page. They open a separate program window in most cases and are standalone programs . Without Java being installed, a computer cannot run Java applications. Whereas, JavaScript is included with all modern browsers and as long as it is enabled will execute the JavaScript when the web page is loaded.
| Sr.no | Java | Javascript |
|---|---|---|
| 1 | Developed by James Gosling | developed by Brendan Eich |
| 2 | Java is an OOP programming language | It is an OOP scripting language. |
| 3 | It contains concepts of inheritance and polymorphism. | It does not contains concepts of inheritance and polymorphism. |
| 4 | It includes classes and objects. | It does not includs classes and objects. |
| 5 | It is both compliled and Interpreted language. | It is only Interpreted language. |
| 6 | It is static programming language. | It is a dynamic language. |
| 7 | Applications created by Java run in a Java virtual machine(JVM) or browser | it code is run on a browser only. |
| 8 | Code needs to be compiled in Java | It code are all in text. |
| 9 | public class HelloWorld
{
public static void main(String[] args)
{
// Prints "Hello, World"
System.out.println("Hello, World");
}
}
| <!DOCTYPE HTML>
<html>
<body>
<p>Before the script...</p>
<script>
alert( 'Hello, world!' );
</script>
<p>...After the script.</p>
</body>
</html>
|
(Visited 210 times, 1 visits today)
Written by:
Way cool, some valid points! I appreciate you making this article available, the rest of the site is also high quality. Have a fun.