運行失敗,但是有結果
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
? for(int j=0;j<= hobbys.length;j++)? ?中j< hobbys.length