ineg
Stack
Before
|
After
|
| value
|
-value
|
Pops an int off the stack, negates it, and pushes the negated integer value back onto the stack. This is the same as multiplying the integer by -1.
Bytecode
Type
See Also
Description
u1
ineg
opcode = 0x74 (116)
lneg, fneg, dneg
Notes
Because of the two's-complement representation used for negative numbers, negating Integer.MIN_VALUE actually produces Integer.MIN_VALUE, not Integer.MAX_VALUE as you might expect.