File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Dan's question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Dan Watch "Dan New topic
Author

Dan's question

Don Bosco
Ranch Hand

Joined: Oct 31, 2002
Posts: 108
int i = 0;
i = i++;
i = i++;
System.out.println("i = " +i);
I was expecting i=2. But the output is 0???


SCJP 1.4<p>Wingardium Leviosa!!
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Please see the following discussions which deals with the same topic:
http://www.coderanch.com/t/190825/java-programmer-SCJP/certification/Array
http://www.coderanch.com/t/239576/java-programmer-SCJP/certification/result
http://www.coderanch.com/t/239779/java-programmer-SCJP/certification/Easy-but-Tricky-count


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Don Bosco
Ranch Hand

Joined: Oct 31, 2002
Posts: 108
That was a great explanation by Maha Anna!!!
Thanks to u guys.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dan's question
 
Similar Threads
display error
how to combine between two arraylist if has same value
column heading dates ...
Declare an Array?
need help?