Description:
public static void main(String[] args) throws Exception
{
int[] arr = new int[3]
for (int i = 0 i < arr.length i++)
{
Scanner input = new Scanner(System.in)
System.out.print("请输入第"+ (i+ 1)+ "个数:")
arr[i] = input.nextInt()
}
selectSort(arr)
printArray(arr)
}
private static void printArray(int[] arr)
{
System.out.print("[")
for (int i=0 i<arr.length i++)
{
if (i!=arr.length-1)
System.out.print(arr[i]+" ")
else
System.out.println(arr[i]+"]")
}
}
To Search:
File list (Check if you may need any files):
Demo.java