为什么说Java是一种解释性语言

Bytecode is not the same as binary code (or machine code). If a program is compiled into binary code, then it's not an interpreted language. A computer can execute binary code(based on the CPU's instruction set) directly once it's loaded into memory. Bytecode needs to be interpreted and put to run by Java VM before a computer can execute the program. So it's the Java VM tells the machine what to do by translates the bytecode examines the bytecode. That's why Java is an interpreted language. The Java VM is the interpreter. Of course, Java VM does works more than just an interpreter.

你可能感兴趣的:(J2SE)