Understanding basic arithmetic operations is crucial for performing calculations.
Source Code
public class ArithmeticOperations {
public static void main(String[] args) {
int a = 10, b = 5;
System.out.println("a + b = " + (a + b));
System.out.println("a - b = " + (a - b));
System.out.println("a * b = " + (a * b));
System.out.println("a / b = " + (a / b));
System.out.println("a % b = " + (a % b)); // Modulus (remainder)
}
}