Java and JavaScript Are Not Quite the Same Thing

Posted by ActiveEnnovations

Many times Java and JavaScript get referred to as if they are the same language. But the main thing they really share is a name and some similar syntax usage. Java is a fully functional object oriented programming language, while JavaScript is a scripting language than only runs within web browsers.

One of the main draws of Java is that it is platform independent. Java code is executed through the Java Virtual Machine and not in the specific systems machine code. This means code can be written once and executed on any machine that can run the Java Virtual Machine. For example in the past, if you wanted to use a Mac program on a Windows PC, you would have to rewrite the program and recompile it on a Windows PC.

In addition to being run on the main computer console, Java programs can be run in web browsers in the form of Applets.

Netscape as a way to enhance the HTML elements present on web pages created JavaScript. JavaScript does not have typed elements as most traditional programming languages do. In JavaScript everything is treated as an object, there are no separate types to differentiate text and numbers. JavaScript is widely used to collect information from Web Forms and to create and manipulate cookies.

So yes, while some of the syntax and formatting look similar, they are not the same thing.

Posted on: 1/7/2010 at 6:11 PM
Tags: , , , , , , ,
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (8) | Post RSSRSS comment feed