pop

Pop top operand stack word

Bytecode

Type Description
u1 pop opcode = 0x57 (87)

Stack ..., word ==> ...

Description The top word is popped from the operand stack.

The pop instruction must not be used unless word is a word that contains a 32-bit data type.

Example

invokevirtual Myclass/test()Z  ; call boolean Myclass.test();
pop                            ; discard the boolean result

Notes

Except for restrictions preserving the integrity of 64-bit data types, the pop instruction operates on an untyped word, ignoring the type of the datum it contains.

1. Use pop2 to remove long integers and doubles from the stack (using pop when the top item on the stack is a long integer or double will cause a verification error).

2. Note there is no matching "push" instruction. Use bipush, sipush, one of the