Java Vs. Javascript Term Paper

Total Length: 923 words ( 3 double-spaced pages)

Total Sources: -4

Page 1 of 3

Java vs. JavaScript

Java was introduced by Sun Microsystems in 1995. The programming language designed for use in the distributed environment of the Internet (TechTarget). Although it was designed to have the "look and feel" of the C++ language, it offers greater ease of use and enforces an object-oriented programming model. Programmers can use Java to create complete applications that may run on a single computer or be distributed among servers and clients in a network. Programmers can also use Java to build a small application module or applet for use as part of a Web page. Applets make it possible for a Web page user to interact with the page.

JavaScript is an interpreted programming or script language created by Netscape to integrate the functionality of Java with HTML (TechTarget). It is similar in capability to Microsoft's Visual Basic, Sun's Tcl, the UNIX-derived Perl, and IBM's Rexx. Script languages are easier and faster to code in than the more structured and compiled languages such as C++ and Java. However, Script languages generally take longer to process than compiled languages and therefore, are more useful for shorter programs. JavaScript is typically used in Web site development to do such things as automatically changing a formatted date on a Web page, causing a linked-to page to appear in a popup window and causing text or a graphic image to change during a mouse rollover.
A programmer can write fully-functional JavaScript using a simple text editor. To write fully-functional Java, a Java Developer's Kit is required (Java vs. JavaScript). JavaScript must be placed inside an HTML document to function while Java applets run independently of the HTML document that is calling for them. Because JavaScript is a scripting language, the program reading it interprets exactly what has been written. In contrast, Java is not interpreted directly. Instead, if must be compiled it first, and that's what the browser reads. Unlike traditional compilers, where the source code is converted into native machine code, the Java compiler generates an intermediate bytecode which is independent of any machine. An interpreter known as a Java Virtual Machine is built into the browser to run this code.

Java is a strongly-typed, object-oriented, complex programming language while JavaScript is a loosely-typed language which is much simpler than Java. JavaScript lacks Java's static typing and strong type checking (The differences between Java and JavaScript). JavaScript does support most of Java's expression syntax and basic control flow constructs. Java offers a compile-time system of classes built by declarations. On the other hand, JavaScript supports a run-time system based on a small number of data types representing numeric, Boolean, and string values. Like Java, JavaScript also supports functions, but without any special declarative requirements. JavaScript functions can be properties of objects, executing….....

Have Any Questions? Our Expert Writers Can Answer!

Need Help Writing Your Essay?