As with the operands of method invocation instructions, the operands of the putfield and getfield
instructions (the constant pool index #4 ) are not the offsets of the fi elds in the class instance. The Java
compiler generates symbolic references to the fi elds of an instance, which are stored in the constant pool.
Those constant pool items are resolved at runtime to determine the actual fi eld offset.
Basically getfield and putfield are used for manipulating object ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.