• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unboxing issues

 
Adeyemi Adeseye
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone explain why this code gives a null pointer exception at runtime


 
Kamil Wojcik
Ranch Hand
Posts: 78
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because default value for Integer (it's an Object!) is NULL
 
Adeyemi Adeseye
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh, tanks, that skipped my mind.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic