Qbasicnews.com

Full Version: Java & Javascript.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
What's the difference? I don't know much Java myself, but I'm trying to learn. People are always confused when I ask them for help, though. Because apparently, Java is different from Javascript.
Javascript is just embedded into your HTML, and can do stuff like make pull-down menus, and rollover buttons on webpages. It can also validate form input before it's submitted to the CGI script - for instance, make sure that an email address you input is valid, with an @ sign, in the right form, etc. Javascript is interpreted.
Java, however, it like a compiled language (it isn't really - it's a bytecode language), in which you make widgets (stuff that isn't on a webpage) or applets (the java you put on a webpage). Commonly used to make games, etc, and very slow.
Java came first, sometime in the late 80s or early 90s. It's what's called a virtual machine, an interpreter made for multiple platforms that reads a program compiled into a special sort of executable.

Java is a "C" like object oriented language, that's compiled to run on the Java Runtime virtual machine. If you've ever seen a grey box on a webpage that turns into some kind of interactive program, that's a java program run by a java plugin on your browser.

Javascript has that name because at the time Netscape was trying to cash in on the innovativeness of Java. Javascript is a small event-based interpreted script that runs inside your html code, that can alter a number of things in the program. It's structured like a mix between visual basic and c. If you've ever seen a mouse rollover, or something changes when you click without refreshing the page, that's javascript.

So, overall, there's a huge difference between the two, the similarity is just some corporate milk-stealing of the name.
One thing, Toonsk...Netscape and Sun Microsystems (makers of Java) developed Javascript, not only Netscape.
One thing zack: it was "Livescript" at that time. Netscape changed to "Javascript" it after the fact Wink
Meh, the point is Sun helped develop it...
Didn't Java come out around 1994 and had a different name?
final answer. The difference is

MADE BY DIFFERENT COMPANYS And ones compiled the other is not

sry for shouting
... and they are used for two different things, which is the important difference. It's almost like VBScript and Visual Basic, though Java is cross platform.
Javascript rocks! While Java doesnt =P.
Pages: 1 2