ICSE Class 9 Computer Applications Question 6 of 17

Conditional Constructs in Java — Question 6

Back to all questions
6
Question

Question 6

Write an if statement to find the smallest of the three given integers using the min() method of the Math class.

Answer
if (a < Math.min(b, c))
  System.out.println(a);
else
  System.out.println(Math.min(b, c));
Get the Bright Tutorials app Stuck on a question? Ask Bright Buddy — your AI tutor — for step-by-step help in the app.