标签:
package string; public class areaCode { static final String[][] fixNumber=new String[][]{{ "020","GZ"},{"0751","SG"},{"0755","SZ"},{ "0756","ZH"},{ "0754", "ST"},{"0757","FS"},{ "0750","JM"},{"0759","ZJ"},{ "0668","MM"},{ "0758","ZQ"},{ "0752","HZ"},{"0753","MZ"},{ "0660","SW"} ,{"0762","HY"},{"0662","YJ"},{"0763","QY"},{"0769","DG"},{"0760","ZS"},{"0768","CZ"},{"0663","JY"},{"0766","YF"}}; public static void main(String[] args) { for (int i = 0; i < fixNumber.length; i++) { for(int j=0;j<fixNumber[0].length;j++) { } } System.out.println("一维数组长度:"+ fixNumber.length); System.out.println("二维数组长度"+fixNumber[0].length); } }
结果:
一维数组长度:21
二维数组长度2
标签:
原文地址:http://www.cnblogs.com/JAYIT/p/5391881.html