What Is The Difference Between Object Code And Byte Code?


2 Answers

pratheepa prakasam Profile
Object code is in a form that only the OS on which it was compiled can interpret. The C compiler outputs object code for the OS that it was written for.

The Java compiler puts out byte code that runs on its JVM(Java Virtual Machine). All the idiosyncrasies of the OS are pushed down into the JVM, hidden from the Java code. So as long as your OS has a JVM, you can run Java bytecode on it without recompiling. Java code compiled on Windows can run on any other OS with the same version of JVM.

Answer Question