Почему при вводе чисел 1,2,3,4 компилятор выводит числа 1,1,1,1 ведь первое условие не выполняется, откуда единица?? Почему не выводится четверка, она же больше остальных?
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String sAge = reader.readLine();
int a = Integer.parseInt(sAge);
String Age = reader.readLine();
int b = Integer.parseInt(sAge);
String sAe = reader.readLine();
int c = Integer.parseInt(sAge);
String sAg = reader.readLine();
int d = Integer.parseInt(sAge);
if (a>=b&&a>=c&&a>=d){
System.out.println(a);
} if (b>=a&&b>=c&&b>=d){
System.out.println(b);
} if (c>=a&&c>=b&&c>=d){
System.out.println(c);
} if (d>=a&&d>=b&&d>=c){
System.out.println(d);
}//напишите тут ваш код
}
}