java qustion

java qustion

how is compiler differ from interpreter?why they use differtly?can we combine it together as single unit?what r there purposes?

View Answers

July 12, 2011 at 4:16 PM

Differences:

1)Compilers translates high-level instructions into machine language while Interpreter translates high-level instructions into intermediate code, and then executes the program.

2)Compiler usually takes a long time to analyze and process a program while Interpreter is comparatively faster at program analysis and processing.

3)Compiler results in an executable program that is a machine-specific form of binary code while Interpreter results in a form of intermediate code that is "interpreted" by another program.

4)Compilers results in a faster running program while Interpreter results in comparatively slow executing programs.

5)Compiler runs on any computer while Interpreter runs only on computers with an interpreter installed.

A compiler translates code from a source language (e.g. C, C++, Java) to a target language, which can then be executed by a (virtual or physical) machine. An interpreter reads code in an interpreted language (e.g. PHP, Perl, JavaScript) and directly executes the contained instructions.

Compilers work with high-level languages, some of which are Java and C. Programmers generally write the code one line at a time with an editor and the resulting file is then run using a compiler specific to the particular language.An interpreter on the other hand translates the code line by line and executes each translated line immediately. Although interpreters do generate binary code, this code isn't compiled into a specific program as much as it is interpreted every single time the program executes. Some of the more familiar interpreted programs are BASIC and Visual Basic.


July 18, 2011 at 10:20 PM

simple--- javacompiler compiles our java source code mean english language mean high level language and generates bytecode mean .class file mean machine understanding code mean 0 and 1 mean in binary format.because computer java leader JAVA VIRTUAL MACHINE understand only bytecode mean .class format.after that interpreter(or JIT COMPILER or logical name JVM) executes the BYTECODE mean .class file.bytecode executed line by line by the interpreter.line by line execution is time expensive.it will take much time.so they changed from interpreter to high JIT compiler(it is also interpreter but more benefits and fast than older),which executes bytecode all at a time instead of execute line by line.so so fast than old.not only that after any class compile if it gave compiler error ,and we solved that line error then onceagain run means then it executes from that error solved line instead of execute all.so fast and best performance than old interpreter(may be jdk1.3).So they introduced JIT compiler newly version may be JDK1.5.JVM IS LOGICAL NAME.JITCOMPILER IS PHYSICAL. MY SINCERE ADVISE TO ALL POSTERS PLEASE POST ALL ANSWERS IN SIMPLE ENGLISH FOR TO UNDERSTAND ALL PEOPLE instead of bookish grammer java words.









Related Tutorials/Questions & Answers:
java qustion
java qustion  how is compiler differ from interpreter?why they use differtly?can we combine it together as single unit?what r there purposes
help me about to solve my qustion
help me about to solve my qustion   An employee receives 15 SR per hour for the first 8 hours of week. After 8 hours (overtime) his rate becomes 20 SR per hour . Write a java class that ask a user to enter the number of hours he
Advertisements
I don't know how to use counter variable in this Qustion ....:(
I don't know how to use counter variable in this Qustion ....:(  Declare and initialize value of array in int type. read and assgin all the mark to every students by using counter variable, k. output should be like
Jmeter - Java Beginners
to my qustion in documenttaion of roseindiana. thank you for more detail please
request header and response - JSP-Servlet
request header and response  hi sir, i have facing some problem in this qustion:- Create a servlet that accept a name and a phone number and contain 4 buttons add,update,delete and view .On clicking on the any of the button
Conversion from string data type into different data types.
Conversion from string data type into different data types.  string str="World id Beutifull"; char chr[20]; char* chrctr ; Qustion is -How to store the 'str' value in 'chr' and 'chrctr'? int abc; sprintf(abc ,"%s",str
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
Java
Java   Whether Java is pure object oriented Language
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
java
java  Does java allows multiline comments
Java
Java  how to do java in command prompt
java
java  Write a java code to print "ABABBABCABABBA
java
java  how use java method
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  is java purely object oriented language
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java   difference between class and interface
Java
Java  how to draw class diagrams in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java   What is ?static? keyword
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  write a java program using filenotfoundexception
java
java pattern code for a given words  java pattern code for a given words pattern
java
java  create java program for delete and update the details,without using database, just a normal java program
java
java code to search the nodes  how to write the java code to search the nodes using routers
java
java  how to edit text document by using java then how to edit starting and ending of text document by using java
java
java  different between java & core java print("code sample
java
java  different between java & core java print("code sample
java
java  how can use sleep in java   which book learn of java language
java
java  how to invoke one chart java file from another java file
java
java  hi im new to java plz suggest me how to master java[email protected]
java
java   How to set java Policy for applet using jdk 6

Ads