Currently, it works, sort it in descending but doesn't satisfy requirement 2 and 4. Not sure what to do
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
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());
ArrayList list= new ArrayList();
list.add(a);
list.add(b);
list.add(c);
Collections.sort(list,Collections.reverseOrder());
System.out.println(list);
}
}