Последнее задание выдаёт ошибку. Хотя я вывел все 3 минимальный значения на экран в чём ЗАГВО́ЗДКА?
package com.javarush.task.task02.task0217;

/*
Минимум четырех чисел
*/
public class Solution {
    public static int min(int a, int b, int c, int d) {
        int result ;
    min(a, b);
      if (d < c)
          result = d;
      else result = c;
      return result;





    }

    public static int min(int a, int b ) {
        int result ;
         if (a < b)
             result = a;
         else
             result = b;
         return result;//напишите тут ваш код

    }

    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));
    }
}