I can not figure out how to conclude. It seems everything is the same as in the first method. But still a mistake. I was looking for information in the internet, but I still can not figure it out (
public class Solution { public static int min(int a, int b, int c, int d) { int m2; if (a < b) m2 = a; else m2 = b; int m3; if (m2 < c) m3 = m2; else m3 = c; int m4; if (m3 < d) m4 = m3; else m4 = d; return m4; //напишите тут ваш код } public static int min(int a, int b) { // тут ошибка if(a<b) return a; else if(b<a) return b; } public static void main(String[] args) throws Exception { System.out.println(min(-20, -10)); System.out.println(min(-20, -10, -30, -40)); System.out.println(min(-20, -10, -30, 40)); } }