aspose file tools
The moose likes Beginning Java and the fly likes autoboxing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "autoboxing" Watch "autoboxing" New topic
Author

autoboxing

vidu sri
Greenhorn

Joined: Jun 15, 2009
Posts: 8

why do i get exception in thread when i run the program
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3870

(Hint: "j=i; " line causes the exception here. When unboxing an Integer to int using intValue() method)

Do you see what those variables are referring to (specially i)?

EDIT : I had edited the wrong post earlier.




SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3870

REMOVED : Duplicate
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40988
    
  28
Please supply more details; tell us what exception you are suffering (though Vijatha Kumar has guessed it ) and show us the stack trace, because that has useful line numbers on.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3870

Campbell Ritchie wrote:Please supply more details; tell us what exception you are suffering (though Vijatha Kumar has guessed it ) and show us the stack trace, because that has useful line numbers on.


Oh! It was too early to answer that
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: autoboxing