Java   View all facts   Glossary   Help
syntactic unit > symbol > operator > prefix operator
Next operatorrelational operator    Upoperator    Previous operatorpostfix operator   

prefix operator comparison table
Subject have example have purpose
++
example expressionequivalent longer expression
a++;
b=a++;
++a;
b=++a;
a=a+1;
b=a; a=a+1;
a=a+1;
a=a+1; b=a;
to increment its operand by one
--
example expressionequivalent longer expression
a--;
b=a--;
--a;
b=--a;
a=a-1;
b=a; a=a-1;
a=a-1;
a=a-1; b=a;
to decrement its operand by one

Next operatorrelational operator    Upoperator    Previous operatorpostfix operator