Не пойму, что добавить
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.io.*;
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 d = Integer.parseInt(reader.readLine());
System.out.println(max(a,b,c,d));
}
public static int max(int a, int b){
if(a>b){
return (int) a;
}else
return b;
}
public static int max(int a, int b, int c, int d){
int maxi = max(a,b);
if(maxi>c && maxi > d)
{
return maxi;
}
else if(c>maxi && c>d)
{
return c;
}
else if(d>maxi && d>c)
{
return d;
}
else if(maxi==c && maxi==d)
{
return c;
}
}
}