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

bcos i read that
Java interpreter converts the high level language code into a intermediate form in Java called as bytecode, and then executes it, where as a compiler converts the high level language code to machine language making it very hardware specific

first we compile a java program with compiler only right?bcos we use JAVAC to compile.tjen we use JAVA to run it.is it an interpreter we r using when using JAVA command?

2007-02-04 18:11:31 · 3 answers · asked by pragud 1 in Computers & Internet Programming & Design

3 answers

Both.
High level languages can be interpreted or compiled.
Java is a hybrid.
In order to keep the language platform-independent Sun microsystems designed it to compile to a standard intermediate form that can be interpreted by any machine architecture's Java runtime package.
This means the comments are removed, external references resolved, labels are resolved (they do not have to be looked up at runtime) and it is easier to have late binding (dynamic external reference resolution).
This gives a nice mix of speed and flexibility.
C and C++ are still much faster, and Visual BASIC is still more flexible (as an interpreted language usually is).

2007-02-04 18:28:49 · answer #1 · answered by J C 5 · 0 0

Just code in a compiled language then, like C or C++. Dump Java...

2016-03-29 05:35:19 · answer #2 · answered by Anonymous · 0 0

Java applications are compiled to bytecode, which at runtime is either interpreted or compiled to native machine code for execution.

For more details:
http://en.wikipedia.org/wiki/Java_%28programming_language%29

2007-02-04 20:15:59 · answer #3 · answered by cool _ sim 2 · 0 0

fedest.com, questions and answers