wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 3817

(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: 3817

REMOVED : Duplicate
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38064
    
  22
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: 3817

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: autoboxing
 
Similar Threads
Boolean.valueOf("True") returns true
Exercise Head first of Java public class TestBox
Testing classes
why null pointer exception?
Head First sharpen your pencil question