import java.util.Arrays;
import java.util.Scanner;
public class DataCompare {
public static void main(String[] args) {
int[] ary = new int[3];
Scanner scanner = new Scanner(System.in);
for(int i = 0; i < ary.length; i++){
System.out.print("Please input a digit(Seq: " + (i+1) + "): ");
ary[i] = scanner.nextInt();
}
Arrays.sort(ary);
System.out.print("After sorted by ASC, the numbers are: ");
System.out.println(ary[i] + "\t");
import java.util.Arrays;
import java.util.Scanner;
public class DataCompare {
public static void main(String[] args) {
int[] ary = new int[3];
Scanner scanner = new Scanner(System.in);
for(int i = 0; i < ary.length; i++){
System.out.print("Please input a digit(Seq: " + (i+1) + "): ");
ary[i] = scanner.nextInt();
}
Arrays.sort(ary);
System.out.print("After sorted by ASC, the numbers are: ");
for(int i = 0; i < ary.length; i++){
System.out.println(ary[i] + "\t");
}
}
}