package project;import javax.swing.plaf.synth.SynthStyle;import org.omg.Messaging.SyncScopeHelper;public class Link { public static void main(String[] args) { // TODO 自動(dòng)生成的方法存根 int arr2[][]={{4,3},{1,2}}; System.out.println("數(shù)組中的元素是:"); for(int x[]:arr2){ for(int e:x){ if(e==x.length){ System.out.println(e); }else System.out.println(e+"'"); } } }}上面代碼中為什么變量e可以和x.length作比較,為什么有可以作為二維數(shù)組的一個(gè)元素輸出,它到底表示的是什么?
關(guān)于遍歷數(shù)組
qq_不睡覺的怪叔叔_0
2016-07-21 15:32:42