В Идее все работает, с любыми цифрами.
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
import java.io.*;
import java.util.*;
public class Solution {
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws Exception {
int d1 = readConsole();
int d2 = readConsole();
int d3 = readConsole();
digits(d1, d2, d3);
}
private static int readConsole () throws IOException {
String txt = reader.readLine();
return Integer.parseInt(txt);
}
public static void digits (int d1, int d2, int d3) {
int a;
int b;
int c;
if (d1>d2 && d1>d3) {
a = d1;
if (d2 > d3) {
b = d2;
c = d3;
} else {
b = d3;
c = d2;
}
}
else if (d2>d1 && d2>d3) {
a = d2;
if (d1 > d3) {
b = d1;
c = d3;
} else {
b = d3;
c = d1;
}
}
else {
a = d3;
if (d1>d2) {
b= d1;
c = d2;
}
else {
b = d2;
c = d1;
}
}
System.out.println(a+ " " + b +" " + c);
}
}