This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inc/Decrement Operators from Corey's blog
 
Similar Threads
Is there a URL that explains[ y = x++ + ++x; ] ?
Question errors
Doubt on static
SCJP 5 Guide by K&B: Q5. Page 391 / 402
allowable values for case labels ?