The unary operators require only one operand.
|++||Add by 1(Incrementing)|
int total = 10; ++total; //total is now 11
int total = 10; --total; //total is now 9
The increment/decrement operators can be applied before (prefix) or after (postfix) the operand.
In prefix, the increment happens first and then the expression will be evaluated. This results in the
mark value is incremented to 11 and then assigned to
int mark = 10; int adjustedMark = ++mark; //adjustedMark will be 11
In postfix, the expression is evaluated first and then the increment gets evaluated afterwards.
int mark = 10; int adjustedMark = mark++; //adjustedMark will be 10