O'Reilly logo
  • Jai Prakash thinks this is interesting:

This code compiles fine, but the JVM throws a NullPointerException when it attempts to invoke doStuff(x) because x doesn’t refer to an Integer object, so there’s no value to unbox.


Cover of OCA Java SE 8 Programmer I Exam Guide (Exams 1Z0-808)


This code doesn't compile