The ++ and – Operators

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.
LVL 7
gudii9Asked:
Who is Participating?
 
objectsCommented:
> I clearly did not understood. Does it mean The ++ and –- Operators instead of The ++ and – Operators.

yes it does


The increment/decrement operators can be applied before (prefix) or after (postfix) the operand. The code result++; and ++result; will both end in result being incremented by one. The only difference is that the prefix version (++result) evaluates to the incremented value, whereas the postfix version (result++) evaluates to the original value. If you are just performing a simple increment/decrement, it doesn't really matter which version you choose. But if you use this operator in part of a larger expression, the one that you choose may make a significant difference.
0
 
gudii9Author Commented:
>>Does it mean The ++ and – - Operators instead of The ++ and – Operators.

So one - is missing in this explanation right. pleas advise.
0
 
objectsCommented:
yes, should really say --
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.