Every where am reading that JVM converts bytecode into something my underlying platform or os can understand and run my java program. My first question is what is this something?? Is it a Machine code?? And second question is that when i compile my program which creates a .class file for me and then when i run it is that when JVM comes in and starts converting the bytecodes present inside .class file into machine code or something?????
Yep, that's exactly what happens: a JIT (Just In Time) compiler compiles the byte code from the .class file to machine code instructions. A 'HotSpot' mechanism controls which part are to be compiled by this JIT compiler and what parts are to be interpreted. Nowadays (almost) everything is compiled to machine code; and it is heavily optimised too so it can run amazingly fast (frequently faster than machine code generated by a classic compiler/linker).
Originally Posted by maya700