public void GetArray() { // catch error
int[] list = new int[Size];
System.out.println("Enter " + Size + " integers of the array:");
for (int i = 0; i < Size; i++) {
int a = i + 1;
System.out.println("Enter integer" + a + ":");
input = new Scanner(System.in);
int Input = input.nextInt();
list[i] = Input;
}
用try catch处理:当输入不为int类型时,如何重做当前循环