why does javac for:
int xx() {
return true ? null : 0;
}
returns?
int xx();
0: aconst_null
1: checkcast #2 // java/lang/Integer
4: invokevirtual #3 // java/lang/Integer.intValue:()I
7: ireturn
Note that my xx returns int- a primitive type. Why is javac disobedient and tries to return reference type - Integer (java.lang.Integer.intValue())