Increment and Decrement Operator

Increment Operator (++)

public static void main(String[] args){
int var=5;
System.out.println(var++);
System.out.println(“\n”+ ++var);
}

Decrement Operator (–)

public static void main(String[] args){
int var=5;
System.out.println(var–);
System.out.println(“\n”+ –var);
}