throws a null pointer exception. Is this documented in javadoc? also if any one could point out why is it not assigned 0 which will be the default for an int.
What happens is that you have an Integer reference with you want to convert into an int value. This happens by calling the intValue() method on the Integer reference.
But because the Integer reference is null it results in a NullPointerException.