运行失败,但是有结果
public static void main(String[] arge){
String a;
String[] hobbys = { "sports","game","movie" };
System.out.println("循环输出数组中元素的值:");
for(int j=0;j<= hobbys.length;j++){
a=hobbys[j];
System.out.println(a);
}
}
public static void main(String[] arge){
String a;
String[] hobbys = { "sports","game","movie" };
System.out.println("循环输出数组中元素的值:");
for(int j=0;j<= hobbys.length;j++){
a=hobbys[j];
System.out.println(a);
}
}
2020-09-21
举报