Learning Java/Introduction to Java: Difference between revisions

Content deleted Content added
→‎The Java Platform: Corrected misinformation regarding bytecode. Provided example code.
Line 49:
javap -c NameOfClassFile
</pre>
where NameOfClassFile is the file ending in ".class" which was generated during compile time.
 
When the code is run by the user, it is processed by Java Virtual Machine (JVM). The JVM is essentially an interpreter for the bytecode. At execution time the JVM translates the compiled bytecode into machine language which can then be executed by the hardware. There are different versions of the JVM which are compatible with various operating systems, allowing the same code to be executed on different platforms. This makes little difference to the end-user, however it greatly reduces the effort needed to develop cross-platform applications on the part of the developer.