• Post Reply Bookmark Topic Watch Topic
  • New Topic

Integer literal  RSS feed

 
Soumy Kumar
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i=2147483647; // compile time
i+=2; // run time..

But why is the answer 0 ???
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As an instance variable, int i is initialized to zero. The method that alters this value is never called. Instead, the overridden version of this method is called.

Try this:

[ February 03, 2005: Message edited by: marc weber ]
 
Soumy Kumar
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot...I am clear .now
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!