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