# Unary Operator Java

**Unary Operator Java (-)**

Unary Operator is used to negate a value. Negation is converting negative number to positive number and positive number to negative number.

** Syntax**

-variable or – value

**Program **

In the following example value of a is 10 and -a is assigned to b. Value of b becomes -10. Value of c is -20 and -c is assigned to d so value of d become +20; Continue reading