posted 18 years ago
Hi,
i tried to run the following piece of code in my program, but it turns out to be a infine loop, can anybody throw some light why this is happening.
for ( long i=Long.MAX_VALUE -2; i<=Long.MAX_VALUE; i++ )
{
/* ...*/
}
There are similar problems with Integer.MAX_VALUE, Long.MIN_VALUE and Integer.MIN_VALUE.
Regards,
Piyush Jain<br /> <br />Being happy doesn't mean everything's perfect. It means you've decided to see beyond the imperfections.