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.noJavaJavascript
1Developed by James Goslingdeveloped by Brendan Eich
2Java is an OOP programming languageIt is an OOP scripting language.
3It contains concepts of inheritance and polymorphism.It does not contains concepts of inheritance and polymorphism.
4It includes classes and objects.It does not includs classes and objects.
5It is both compliled and Interpreted language.It is only Interpreted language.
6It is static programming language.It is a dynamic language.
7Applications created by Java run in a Java virtual machine(JVM) or browserit code is run on a browser only.
8Code needs to be compiled in JavaIt 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 178 times, 1 visits today)
Share with Friends :
Written by:

One thought on “Java & Javascript

  • 24/04/2018 at 5:52 am
    Permalink

    Way cool, some valid points! I appreciate you making this article available, the rest of the site is also high quality. Have a fun.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *