aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inc/Decrement Operators from Corey's blog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inc/Decrement Operators from Corey Watch "Inc/Decrement Operators from Corey New topic
Author

Inc/Decrement Operators from Corey's blog

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 160
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 ]

SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...
Sambit Banerjee
Greenhorn

Joined: Jul 29, 2008
Posts: 18
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.
 
wood burning stoves
 
subject: Inc/Decrement Operators from Corey's blog