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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "The ++ and – Operators" Watch "The ++ and – Operators" New topic

The ++ and – Operators

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
I was looking at following link on The ++ and – Operators

>>>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

Joined: Oct 13, 2005
Posts: 46437
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:
subject: The ++ and – Operators
jQuery in Action, 3rd edition