Объясните за методом if или while, не методом maxx.
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));
String q = reader.readLine();
String w = reader.readLine();
String e = reader.readLine();
String r = reader.readLine();
int a = Integer.parseInt(q);
int s = Integer.parseInt(w);
int d = Integer.parseInt(e);
int f = Integer.parseInt(r);
if (a > s && a > d && a > f)
{
System.out.println(a);
}
else if (s > a && s > d && s > f)
{
System.out.println(s);
}
else if (d > a && d > s && d > f)
{
System.out.println(d);
}
else if (f > a && f > d && f > s)
{
System.out.println(f);
}
else
{
System.out.println(a || s || d || f);
}
}
}