Помогите, пожалуйста. Вроде все верно, ошибка только в этом пункте.
package com.javarush.task.task02.task0217;
/*
Минимум четырех чисел
*/
public class Solution {
public static int min(int a, int b, int c, int d) {
int n;
if (a<b)
if (a<c)
if (a<d)
n=a;
else
n=d;
else
if (c<d)
n=c;
else
n=d;
else
if (b<c)
if (b<d)
n=b;
else
n=d;
else
if (c<d)
n=c;
else
n=d;
return (n);
}
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));
}
}