File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Inc/Decrement Operators from Corey's blog

Denise Advincula
Ranch Hand

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

Joined: Jul 29, 2008
Posts: 18
for the second question if you do it manually then it will be like this:
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.
I agree. Here's the link:
subject: Inc/Decrement Operators from Corey's blog
It's not a secret anymore!