ifnull : jump if null : index : visitJumpInsn()

Description
ifnull pops the top object reference off the operand stack. If the object reference is to the special object null, execution branches to the address (pc + branchoffset), where pc is the address of the ifnull opcode in the bytecode and branchoffset is a 16-bit signed integer parameter following the ifnull opcode in the bytecode. If the object reference on the stack is not null, execution continues at the next instruction.

If you are using Jasmin, branchoffset is computed for you from the address of <label>.
Example
    aload_1         ; push the object reference in local variable 1 onto the stack
    ifnull Label    ; if local variable 1 is null, jump to Label
    return          ; return if local variable 1 isn't null
Label:
    ; execution continues here if local variable 1 is null...
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
ifeq iflt ifle ifne ifnonnull ifgt ifge
Stack
Before After
objectref ...
... ...
Bytecode
Type Description
u1 ifnull opcode = 0xC6 (198)
s2 branch-offset