若執行下列的 Java 程式碼,則螢幕上的輸出結果為何? public class ArrayTest{ public static void main(String[] args){ int[][] intArray = {{1, 2, 3, 4}, {5, 6, 7, 8}}; for(int i=0; i<intArray.length; i++){ for(int j=intArray[i].length; j>0; j--){ if (j<=2){ continue; } else { System.out.println(intArray[i][intArray[i].length-j]); } } } } }
A1 5
B1 2 5 6正確答案
C1 2 3 5 6 7
D1 2 3 4 5 6 7 8
答案與詳解
