Storing field information in a constant pool reduces the size of the bytecode instructions. This is because the instructions only have to store the integer index into the constant pool instead of the entire constant. After analyzing the first instruction, it's easy to guess the meaning of the other instructions. The 'invokevirtual' invokes the println method, which pops its two arguments from the operand stack. It turns out that an important aspect of security is the prevention of memory-related bugs.
Computer criminals exploit memory bugs to sneak malicious code into otherwise safe programs.
3 fadd 4 freturn At the beginning of a Java method, the virtual machine places method parameters in a data structure called the local variable table. As its name suggests, the local variable table also contains any local variables that you declare. In this example, the method begins with three local variable table entries, these are for the three arguments to the add method. Slot 0 holds the this reference, while slots 1 and 2 hold the float and int arguments, respectively. The interesting thing about these instructions is in the 'i' and 'f' prefixes, which illustrate that Java bytecode instructions are strongly typed.