Буду благодарна за помощь.
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Solution {
int max;
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String sa = reader.readLine();
int a = Integer.parseInt(sa);
String sb = reader.readLine();
int b = Integer.parseInt(sb);
String sc = reader.readLine();
int c = Integer.parseInt(sc);
String sd = reader.readLine();
int d = Integer.parseInt(sd);
if(a>b){
if (a>c){
if (a>d)
max = a;
else
max = d;
}
else if (c>d)
max = c;
else
max = d;
}
else if (b>c){
if (b>d)
max = b;
else
max = d;
}
else if (c>d)
max = c;
else
max = d;
}
System.out.println(max);
}
}