Знатоки , прошу у вас помощи! Кто может ясно растолковать , что тут не так ? Не совсем врубился как использовать метод
public static int min(int a, int b) {
if (a < b)
return a;
else return b;
package com.javarush.task.task02.task0217;
/*
Минимум четырех чисел
*/
public class Solution {
public static int min(int a, int b, int c, int d) {
int z = 11;
if (a <= b && a <= c && a <= d) z = a;
if (b <= a && b <= c && b <= d) z = b;
if (c <= a && c <= b && c <= d) z = c;
if (d <= a && d <= b && d <= c) z = d;
return z;
}
public static int min(int a, int b) {
if (a < b)
return a;
else return b;
}
public static void main(String[] args) throws Exception {
System.out.println(min(-20, -10));
System.out.println(min(-40, -10, -30, 40));
System.out.println(min(-20, -40, -30, 40));
System.out.println(min(-20, -10, -40, 40));
System.out.println(min(-20, -10, -30, -40));
}
}