What are bytecodes and how does the JVM handle them

前端 未结 6 1565
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 04:33

I heard many times that Java implemments JIT(just-in-time) compilation, and its bytecodes which are portable across platforms get \"interpreted\" by JVM. However, I don\'t r

6条回答
  •  死守一世寂寞
    2020-11-29 05:17

    jcyang already provided a link to wikipedia, but this one is a better match to your question:

    Java Bytecode

    The Java Compiler compiles Java Source code to class files. The class's methods are translated to Byte Code and the Java virtual machine (JVM) interpretes this byte code. A Just In Time compiler (JIT) may be used to translate the byte code to machine code to speed up execution of class methods.

提交回复
热议问题