iadd
Stack
Before
|
After
|
| value1
|
result
|
| value2
|
...
|
| ...
|
Pops two integers from the operand stack, adds them, and pushes the integer result back onto the stack. On overflow, iadd produces a result whose low order bits are correct, but whose sign bit may be incorrect.
Example
bipush 5 ; push first int
bipush 4 ; push second int
iadd ; add integers
; the top of the stack now
; contains the integer 9
Bytecode
Type
See Also
Description
u1
iadd
opcode = 0x60 (96)
ladd, fadd, dadd