码迷,mamicode.com
首页 > 编程语言 > 详细

二维数组

时间:2016-04-14 17:52:56      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!