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

the ++ operator

 
Vishwanath Krishnamurthi
Ranch Hand
Posts: 331
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Considering the code,



I don't understand why the O/P of the code is 0 and not 1... I thought
lineA would reduce to i=0 and just after that assignment is done i value would be incremented, so that println() would see a println(1) but it doesnt seem to be so...

Can you please help me understand this?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See JavaRanch FAQ: Post Increment Operator And Assignment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic