I was wondering if Java get’s assembled and in my readings I found the compiler creates byte code which is then run on the Java Virtual Machine. Does the JVM interpret the byte code and execute it?
This is why I’m confused. Today in class the prof said “the compiler takes a high level language, creates assembly language, then the assembler takes the assembly language and creates machine language (binary) which can be run”. So if Java compiles to bytecode how can it be run?
Think of bytecode as the machine langauge of the JVM. (Compilers don’t HAVE to produce assembly code which has to be assembled, but they’re a lot easier to write that way.)