| Author |
Simple Doubt
|
Mahesh Subramaniya
Greenhorn
Joined: Dec 12, 2004
Posts: 19
|
|
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?
|
Mahesh Subramaniya
OCMJEA/SCEA
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
This question comes often It's in the FAQ: http://faq.javaranch.com/view?PostIncrementOperatorAndAssignment
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: Simple Doubt
|
|
|