iconst_m1
Stack
Before
|
After
|
| ...
|
-1
|
|
|
...
|
This instruction pushes the int -1 onto the operand stack.
Bytecode
Type
See Also
Description
u1
iconst_m1
opcode = 0x02 (2)
bipush, sipush, ldc, ldc_w, ldc2_w, aconst_null, iconst_<n>, lconst_<l>, fconst_<f>, dconst_<d>
Notes
You could also use bipush -1, sipush -1 or ldc -1 to achieve the same effect, although iconst_m1 is typically more efficient and uses fewer bytes in the bytecode.