File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple Doubt

 
Mahesh Subramaniya
Greenhorn
Posts: 19
Java Mac
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why is the output of "i" of the following snippet is 0 and not 1

int i = 0;
i = i++

Does the expression gets evaluvated from left to right?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question comes often
It's in the FAQ:
http://faq.javaranch.com/view?PostIncrementOperatorAndAssignment
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic