Also it is worth noting that the Java snippets you
showed actually doesn't translate to the assembly,
Heres why:
Java is run on something called the "JVM" (Java Virtual Machine)
The JVM interprets byte code.
In a normal (compiled) language the compilation pipeline looks something like this:
(its kinda hard to show this, but essentially the kernel runs on the CPU, but doesn't interprete the executable, instead it loads it into memory and responds to any interrupts)
But in the Java example, that goes one level Higher:
Just as a heads up, you forgot a newline for the c++ one,
it would be best to write it like:
Also it is worth noting that the Java snippets you
showed actually doesn't translate to the assembly,
Heres why:
Java is run on something called the "JVM" (Java Virtual Machine)
The JVM interprets byte code.
In a normal (compiled) language the compilation pipeline looks something like this:
(there are compilers that are "one-pass" such as tcc which skip the two intermediate states)
In Java, it goes from source into bytecode
Our executable from the compilation pipe is run like this:
(its kinda hard to show this, but essentially the kernel runs on the CPU, but doesn't interprete the executable, instead it loads it into memory and responds to any interrupts)
But in the Java example, that goes one level Higher:
Where the Java Runtime is an executable that interprets the bytecode