In this exercise requirement don't met even if the print is right i guess there is something wrong in the array printing.
Can someone explain to me?
Thanks so much
package com.codegym.task.task04.task0420;
/*
Sorting three numbers
*/
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.util.Collections;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner s = new Scanner(System.in);
int n1 = s.nextInt();
int n2 = s.nextInt();
int n3 = s.nextInt();
Integer [] ar = {n1, n2, n3};
System.out.println();
Arrays.sort(ar, Collections.reverseOrder());
//for (int num : ar) {
//System.out.print(num + " ");
System.out.println(Arrays.toString(ar));
}
}