In this example we will show you how to use subtraction operator in Java.
Source Code
package com.beginner.examples;
public class SubtractionOperator {
public static void main(String[] args) {
int a = 5;
int b = 3;
System.out.println(a - b); // use subtraction operator
}
}
Output:
2