Something to do with negative numbers perhaps? Thanks in advance for any help.
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
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 d = (Math.min(a,b));
int d1 = (Math.min(d,c));
int f = (Math.max(a,b));
int f1 = (Math.max(f,c));
int e = 0;
if(a>=b&&a<=c){
e = a;
}
else if(b>=a&&b<=c){
e = b;
}
else if(c>=b&&c<=a){
e = c;
}
System.out.println(f1 + " " + e + " " + d1);
}
}