+ 1
Creat a program to demonstrate the use of Unary operators.
class UnaryArithmetic { public static void main(String args []) { int a=20 , result; result = +a; System.out.println(result); result = -a; System.out.println(result); result = ++a; System.out.println(result); result = --a; System.out.println(result); result = a++; System.out.println(result); result = a--; System.out.println(result); } }
1 Resposta
0
!