Difference Between Compiler and Interpreter in Java
| Compiler | Interpreter | 
|---|---|
| It considers the completion of your program as input for converting to machine code. | It considers 1 statement in your program at a time as input for converting to machine code. | 
| It usually generates intermediate code in the form of the object file (.obj). | It doesn't create an intermediate object (.obj) code. | 
| Faster execution of control statements as compared to the interpreter. | Slower execution of control statements as compared to the compiler. | 
| Detected errors in the program get displayed after the entire program is read by compiler. | Detected errors in the program get displayed after each instruction read by the interpreter. | 
| Example: C++, Java. | Example. BASIC, Python, PHP. | 
Comments
Post a Comment