my dog learned polymorphism*
The moose likes Beginning Java and the fly likes The ++ and – Operators Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "The ++ and – Operators" Watch "The ++ and – Operators" New topic
Author

The ++ and – Operators

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
I was looking at following link on The ++ and – Operators
http://www.jchq.net/certkey/0501certkey.htm

>>>This is because the ++ is placed after the number 1, and thus the incrementation (the adding of 1) will occur after the line is run. The same principle is true for the – operator.

I clearly did not understood. Does it mean The ++ and –- Operators instead of The ++ and – Operators.

Any ideas, resources,sample code,links, highly appreciated. thanks in advance
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
The bit about "after the line has run" is incorrect.
Look at these old thread, and the links in them: 1 2, and this FAQ.

As you will see, the ++ and -- operators cause no end of confusion.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The ++ and – Operators
 
Similar Threads
question from Marcus Green's Mock Exam 3
Unary operator evaluation
Best way of finding the bigdecimal is greater than 1 ?
shift operators
New guy with a problem