Skip to content

Unary Operators

Increment, decrement and negation operators.

package DSA.Operators;
public class unary {
public static void main(String[] args) {
int a = 10;
// int b = ++a;
int c = a++;
System.out.println(a);
// System.out.println(b);
System.out.println(c);
}
}