The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 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:

Increment operator.....

Posted by Ramesh on December 19, 2000 at 9:18 PM

Hi
Can any one explain why the below program is givig out put 10 insted of 11
public class incTest
{
public static void main(String [] arg)
{
int i = 10;
i = i++;
System.out.println(i);
}

}

Thanx & Regards

Ramesh



Replies:

Sponsored Links



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