Answer :

Answer:

import java.util.Scanner;

public class Main {

 public static void main(String[] args) {

   Scanner scanner = new Scanner(System.in);

   int num1 = scanner.nextInt();

   int num2 = scanner.nextInt();

   int num3 = scanner.nextInt();

   int min = Math.min(num1, Math.min(num2, num3));

   System.out.println(min);

 }

}

Explanation:

The program first imports the Scanner class from the java.util package, which allows us to read input from the user. Then, it reads three integers from the user using the nextInt() method of the Scanner class and stores them in variables num1, num2, and num3.

Next, the program calculates the minimum of the three integers using the min() method of the Math class, which takes two integers as arguments and returns the minimum of the two. In this case, we use the min() method twice to find the minimum of all three integers.

Finally, the program prints the minimum value to the console using the println() method of the System.out object.

Other Questions