Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inc/Decrement Operators from Corey's blog

 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from Corey's SCJP Tipline. Amazing Posts by the way, they cover a lot of basics but tricky ones!

I'm looking for the same step by step solution covered in this first example:




This next example, however, have no solution presented...



I tried to run the code and it produced 8, hence the answer is E. But if I do it manually, I couldn't produce the same result. I hope anyone can help me with this.
[ September 02, 2008: Message edited by: Denise Saulon ]
 
Sambit Banerjee
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for the second question if you do it manually then it will be like this:
x=1+1+2-2+2+4
so the answer comes to 8.
i hope you have got it now,if you have any problem then i can give you an explanation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic