import java.util.Scanner;
Scanner a=new Scanner(System.in);
int i=a.nextInt();
int [] num=new int[]{10,11,12,13,14,15,16,17,18};
System.out.println(num?);//如何输出数组关于i的长度?
import java.util.Scanner;
Scanner a=new Scanner(System.in);
int i=a.nextInt();
int [] num=new int[i];
System.out.println(num.length);
数组的长度是用数组的length方法就可以知道 望采纳