English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i know that java runs with virtual machine and javascript runs in a web browser but i want to know how big the source code of internet explorer would be? because it is capable of executing html,dhtml and all other languages.
while java developement kit(JDK) runs only java programes . So is internet explorer smarter than any other compiler? and why core java is more popular than javascript ? I find javascript very easy to learn than core java.

2007-02-21 04:50:14 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

You already seem to understand that Java and JavaScript have very little in common besides their names.

Java is a complete object oriented programming language that allows you to create applications. You could even write your own browser in Java if you so desired.

JavaScript is a comparatively small scripting language that you can only use on the web with a JavaScript enabled web browser.

The best way I can think of explaining it is that Java can "do stuff" while JavaScript can only ask other things to "do stuff".

Based on their capabilities, the amount of functionality in JavaScript is far less than in Java so I would expect the amount of source code to be that much smaller.

2007-02-21 05:03:25 · answer #1 · answered by hatevirtual 3 · 1 0

The difference between Java and Javascript should not be signified by mere examples of syntactical variations. Java is a programming language, and therefore a program written in Java must be compiled. With Java you can create stand-alone program, applets, and servlets. Javascript is a scripting language, and therefore does not need a compiler, but rather an interpreter. Javascript runs via a browser and is not used to create stand-alone programs. Those explanations are not even the tip of the iceburg, but they do give a quick overview of the major difference. Java would not be used to create a dynamic website alongside HTML, CSS and whatever else you use; that is the purpose of Javascript. However, if you wished to have some animation, game, or business application as part of your website, then a Java applet could do the trick. The only problem that I see with Java applets today, is that Flash and Silverlight run much faster in the browser.

2016-05-24 02:56:17 · answer #2 · answered by Anonymous · 0 0

Java, being *compiled*, is translated into machine language instructions right away, and need not be translated on-the-run. Javascript, as a script, must be translated on-the-run, and thus may take longer to execute. Internet explorer is not smarter: all browsers can handle javascript.

2007-02-21 05:01:34 · answer #3 · answered by fjpoblam 7 · 0 0

The previous 3 people have answered your question correctly but I just gotta point out that "javascript" was some unnecessary confusion added by some knuckleheads back when java was first introduced by Sun.

2007-02-21 05:19:48 · answer #4 · answered by bytekhan 2 · 0 0

They are two different languages: one main difference is that in Java you have to define classes. Javascript is loosely-typed (i.e you do not have to define types for primitive variables) and simplified: for instance, I have not heard of a 'private' scope in Javascript.

2007-02-21 04:59:55 · answer #5 · answered by Amit Y 5 · 0 0

fedest.com, questions and answers