I know there's a bit of code that could be compacted
package com.codegym.task.task04.task0419;
/*
Maximum of four numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
String aa = reader.readLine();
int a = Integer.parseInt(aa);
String bb = reader.readLine();
int b = Integer.parseInt(bb);
String cc = reader.readLine();
int c = Integer.parseInt (cc);
String dd = reader.readLine();
int d = Integer.parseInt(dd);
if ((a > b) && (b > c) && (c > d) && (a > c) && (b > a) && (d > a) && (a > d) && (b > d) && (c > a) && (c > b) && (d > b) && (d > c)) {
System.out.println(a);
}
else if ((b > a) && (b > c) && (b > d)) {
System.out.println(b);
}
else if ((c > a) && (c > b) && (c > d)) {
System.out.println(c);
}
else if ((d > b) && (d > c) && (d > a)) {
System.out.println(d);
}
}
}