ifne : jump if nonzero : index : visitJumpInsn()

Description
ifne pops the top int off the operand stack. If the int does not equal zero, execution branches to the address (pc + branchoffset), where pc is the address of the ifne opcode in the bytecode and branchoffset is a 16-bit signed integer parameter following the ifne opcode in the bytecode. If the int on the stack equals zero, execution continues at the next instruction.

If you are using Jasmin, branchoffset is computed for you from the address of <label>.
Example
    iload_1         ; push the int value in local variable 1 onto the stack
    ifne Label      ; if the value on the stack is nonzero, jump to Label
    return          ; return if local variable 1 is zero
Label:
    ; execution continues here if local variable 1 does not equal zero...
Notes
Addresses are measured in bytes from the start of the bytecode (i.e. address 0 is the first byte in the bytecode of the currently executing method).
See also
ifnull ifeq ifle iflt ifnonnull ifgt ifge
Stack
Before After
value ...
... ...
Bytecode
Type Description
u1 ifne opcode = 0x9A (154)
s2 branchoffset