Myth - JavaScript and Java Language are the same

October 2017




Myth


JavaScript and Java are thought to be same language or that JavaScript is believed to be some kind of lighter version of Java.

Reality


Java and JavaScript are two distinct programming languages, many people tend to be confused when using both terms due to the similarity in the names.

JavaScript is used in the creation of dynamic web pages. It is client side language and is limited to run on a client browser.

JavaScript features
  • Interpreted by client, but it is not compiled .
  • Object-based. Code uses built-in, extensible objects, but no classes or inheritance.
  • Code integrated and embedded in HTML.
  • Variable data types not declared . .
  • Cannot automatically write to hard disk.


Java is a high level object oriented programming language used for software development or server side applications.

Java feautures
  • It is compiled on server before being run on client.
  • Object-oriented. Applets consist of object classes with inheritance.
  • Applets are accessed from HTML pages,but are distinct from these pages
  • Variable data types must be declared




The main difference between these two languages, is that JavaScript must be used within the web browser (it is embedded within the HTML code) and that Java applets are stand alone functions that can work outside your web browser.
Published by netty5. Latest update on August 15, 2009 at 09:13 PM by fahd_zboot.
This document, titled "Myth - JavaScript and Java Language are the same," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).