Java - Is binary code the same as ByteCode?

前端 未结 6 1018
后悔当初
后悔当初 2021-01-31 03:33

In Java, does \"binary code\" means the same as \"Java bytecode?\"

Is this the flow in Java ?

Java File (.java) -> [javac] -> ByteCode File (.

6条回答
  •  -上瘾入骨i
    2021-01-31 04:08

    The answer depends on what you mean by binary code.

    Java bytecode is a binary data format that includes loading information and execution instructions for the Java virtual machine. In that sense, Java bytecode is a special kind of binary code.

    When you use the term "binary code" to mean machine instructions for a real processors architecture (like IA-32 or Sparc) then it is different.
    Java bytecode is not a binary code in that sense. It is not processor-specific.

提交回复
热议问题