Hi, I was just wondering what the difference is between regular Java and Javascript.
Printable View
Hi, I was just wondering what the difference is between regular Java and Javascript.
Everything?
They are two completely different languages. When JavaScript was created (which was after Java) the creaters, purposely, designed it with similar syntax and, purposely, gave it a similar name in order to "ride the Java wave", which was just beginning, then.
So, other than a superficial syntax similarity, there is nothing that is the same.
But, what is JavaScript primarily used for?
Webpage "dynamics". Find a JavaScript forum and you'll get better answers.
Java is not JavaScript and JavaScript is not Java.
Java is a complex language, and allows programmer to create stand alone applications, which applications that can run by themselves. JavaScript cannot do that. JavaScript is much simpler language, must always embedded in another language, mostly in HTML/XHTML.
Another similarity is also there. Both languages are object oriented. You can work on with object in both cases.
Those are the most valuable feature in both languages. Actually there a lot. Just search on the web, you can find them easily.
To start off with a simple phrase, Javascript is mainly used for client side validation. For eg., a railway reservation form will have many validations like, checking for proper email id and so on.
Whereas java is a programming language with which you can develop an application( which is not possible with javascript).
I found a nice simple article about this on the web.
Java vs. JavaScript