prev next contents
pop

discard top word on stack

Jasmin Syntax


    pop

Stack

Before

After
item
...
...

Description

Pops the top single-word item off the stack and discards it.

Example


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

Bytecode

Type

Description
u1
pop opcode = 0x57 (87)
See Also

pop2

Notes

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


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates