I get correct answers for all but first set, which gives me min of 3 instead of min of 1.
![]()

package com.codegym.task.task02.task0216;
/*
Requirements:
1. The program should display text on the screen.
2. The min method should not display text on the screen.
3. The main method should call the min method four times.
4. The main method should display the result of the min method. Each time, on a new line.
5. The min method must return the minimum of the numbers a, b, and c.
*/
public class Solution {
public static int min(int a, int b, int c) {
int m3;
if (a <= b && a <= c)
m3 = a;
if (b <= a && b <= c)
m3 = b;
else
m3 = c;
return m3;
}
public static void main(String[] args) throws Exception {
System.out.println(min(1, 2, 3));
System.out.println(min(-1, -2, -3));
System.out.println(min(3, 5, 3));
System.out.println(min(5, 5, 10));
}
}