The JVM is a stack oriented machine. Method frames are pushed on the stack on method invocation and popped from the stack on method return. A frame contains an operand stack from which JVM instructions take values to operate on and return results to. For example, to add the integers 5 and 6, the instructions could be:
bipush 5 Push integer 5;bipush 6 Push integer 6;
iadd Pop two integers, add them, and push result.
The JVM instructions are called bytecodes and are stored in class files.
In this chapter the types the JVM operates on and the runtime data areas of the JVM are described.