File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unboxing issues

 
Adeyemi Adeseye
Greenhorn
Posts: 27
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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