The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

problem with the increment

Posted by Jody Brown on November 26, 2000 at 3:20 PM

Kannappan,

There are two ways to increment an int:-

x = x + 1;
x++;

x = x++; wont do a thing.

because it doesnt work, x will always be 0.

regards,

Jody



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us