Что не так?
package com.javarush.task.task05.task0531;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Совершенствуем функциональность
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
int g = Integer.parseInt(reader.readLine());
int minimum = min(a, b, c, g);
System.out.println("Minimum = " + minimum);
}
public static int min(int a, int b, int c, int g) {
if(Math.min(a, b) < Math.min(c, g)) {
return Math.min(a, b);
} else if(Math.min(a, b) >= Math.min(c, g)) {
return Math.min(c, g);
} else if(Math.min(a, c) <= Math.min(b, g)) {
return Math.min(a, c);
} else if(Math.min(a, c) >= Math.min(b, g)) {
return Math.min(c, g);
} else if(Math.min(a, g) <= Math.min(b, c)) {
return Math.min(a, g);
} else if(Math.min(a, g) >= Math.min(b, c)) {
return Math.min(b, c);
}
}
}