I encountered a question,which comprises of following code snippet.
There is no compilation error.
But at the runtime an
java.lang.NullPointerException
is thrown.
If I replace Integer with int, it works fine.
I was wondering about why this happens?
Thanks,
Rohit