DEV Community

[Comment from a deleted post]
Collapse
 
gokuldroid profile image
Gokuldroid

Yes, that's why wrapped types (like Integer, Boolean) can be null. It is easy to make a mistake. I just wanted to show one way to get null pointer exception. There is lot of other cases also.