What is the difference in C and Java ?

Why the c use only compiler ? while java used both interpreter as well as compiler ?

Showing Answers 1 - 3 of 3 Answers

Both C and Java use a compiler - *usually*, C compilers generate machine code for specific hardware, while Java compilers generate "byte" code for the Java Virtual Machine (JVM), which is basically a machine code level interpreter.
That doesnt have to be the case, though. There was at least one C compiler that generated byte code for the JVM (cant remember the name of it, though), and theres no reason you couldnt generate native machine code from Java (although without features in the JVM, it may not be terribly safe or useful).
Theres also at least one C *interpreter*, although again I dont remember the name of it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions