package pag1;
import java.util.Arrays;
import java.util.Scanner;
public class ex3 {
public static void main (String[] args){
Scanner x = new Scanner (System.in);
int posicao = 0;
int[] numeros = new int [5];
System.out.println("Digite 5 números: ");
while (posicao < numeros.length){
numeros [posicao] = x.nextInt();
posicao++;
}
System.out.println(Arrays.toString(numeros));
Arrays.sort(numeros, 0, numeros.length);
System.out.print("[" + numeros[4] + ", " + numeros[3] + ", " + numeros[2] + ", " + numeros[1] + ", " + numeros[0] + "]");
}
}
How can I do to show the items of the array reverted without being using this game that I did in the end?