運(yùn)行失敗,但是有結(jié)果
public static void main(String[] arge){
? ? ? ? String a;
? ? ? ? String[] hobbys = { "sports","game","movie" };
? ? ? ? System.out.println("循環(huán)輸出數(shù)組中元素的值:");
? ? ? ? for(int j=0;j<= hobbys.length;j++){
? ? ? ? ? ? a=hobbys[j];
? ? ? ? ? System.out.println(a);
? ? ? ? }
? ? }
2020-09-21
? for(int j=0;j<= hobbys.length;j++)? ?中j< hobbys.length