This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello... I am preparing for SCJP and i found one difficulty regarding operators.
for e.g. in a compound statement like a[i++][++i] or statements like this .... (assume i as integer).
so i am confused about that when actually value of i will be incremented here and how this entire statement will be evaluated by the compiler. In Kathy sierra and Bert Bates book there is very less details are given . can any one prefer any material to understand this or can make me understand this topic ?
int j =12; i= ++j + j++ * ++j ;
the order is from left to right:
1- First all your j's will be inialized as follws i = 13 + 13 * 15. and you end up with j=15
2- the arithmatic operation carried out as i = 208
(why all these smiles to someone who want to let us know more)
love demgracy, knowledge demogracy, open source and Java - OCPJP 76%