Пишет: Возможно переменная max не проинициализирована
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
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 max, mid, min;
if (a >= b && a >= c) {
max = a;
if (b > c){
mid = b;
min = c;
}
else {
mid = c;
min = b;
}
}
else if (b > a && b > c) {
max = b;
if (a > c){
mid = a;
min = c;
}
else {
mid = c;
min = a;
}
}
else if (c > b && c > a) {
max = c;
if (b > a){
mid = b;
min = a;
}
else {
mid = a;
min = b;
}
}
System.out.println(max + " " + mid + " " + min);
}
}