Прошу помочь разобраться..
package com.javarush.task.task04.task0420;
/*
Сортировка трех чисел
*/
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 f=reader.readLine();
String g=reader.readLine();
String h=reader.readLine();
int a=Integer.parseInt(f);
int b=Integer.parseInt(g);
int c=Integer.parseInt(h);
System.out.print(max(a,b,c));
System.out.print(" "+sred(a,b,c));
System.out.print(" "+min(a,b,c));
}
public static int min(int a, int b, int c) {
if (a<=b && a<=c)
return a;
else
if (b<=a && b<=c)
return b;
else
return c;
}
public static int max(int a, int b, int c) {
if (a>=b && a>=c)
return a;
else
if (b>=a && b>=c)
return b;
else
return c;
}
public static int sred(int a, int b, int c) {
if (a>=b && a<=c)
return a;
else
if (b>=a && b<=c)
return b;
else
return c;
}
}