In this example we will show you how to use decrement operator in Java.
Source Code
package com.beginner.examples;
public class DecrementOperator {
public static void main(String[] args) {
int i = 16;
--i; // use decrement operator
System.out.println(i);
}
}
Output:
15