//请错过
public static void mian(String[] args){
Scanner scanner = new Scanner(System.in);
int [] array = null;
for(int i = 0;i <n;i++){
int array[i] = scanner.nextInt();
}
}
答案 0 :(得分:-1)
import java.util.Scanner;
public class MyMain {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int [] array = new int[5];
for(int i = 0;i < 5;i++){
System.out.println("Enter number ");
array[i] = scanner.nextInt();
}
for(int i : array) {
System.out.println(i);
}
scanner.close();
}
}