If you are interested in the number of JVM instructions, you can manually count them. A source:
public static void main() { int a = 0; int b = 0; int c = 0; if (a == b) { c++; } }
You can look at the bytecode by calling javap -c YouClassName :
public static void main(); Code: 0: iconst_0 1: istore_0 2: iconst_0 3: istore_1 4: iconst_0 5: istore_2 6: iload_0 7: iload_1 8: if_icmpne 14 11: iinc 2, 1 14: return
The if statement that interests you is up to 4 JVM instructions.
source share