Java   View all facts   Glossary   Help
syntactic unit > symbol > operator > unary operator
Next operator.    Upoperator    Previous operatortertiary operator   

unary operator comparison table
Subject use in have example have purpose return indicate
!  to negate the value of the operanda booleanlogical NOT
++prefix or postfix form
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 onea value called its result 
--prefix or postfix form
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 onea value called its result 
~  to perform a bitwise complementa value called its result 

Next operator.    Upoperator    Previous operatortertiary operator