Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

autoboxing  RSS feed

 
vidu sri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

why do i get exception in thread when i run the program
 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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.



 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
REMOVED : Duplicate
 
Campbell Ritchie
Sheriff
Posts: 53750
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!