@Test
public void test8() {
String[][] cities = new String[3][4];
cities[0]= new String[]{"长春市","吉林市","四平市","通化市"};
cities[1]= new String[]{"沈阳市","大连市","丹东市","营口市"};
String[] arr = {"哈尔滨市","齐齐哈尔市","佳木斯市","漠河市"};
cities[2]= arr;
System.out.println("请选择省份:0=吉林省,1=辽宁省,2=黑龙江省,3=全部城市");
int choose = new Scanner(System.in).nextInt();
if(choose != 3) {
for(int i=0;i<cities[choose].length; i++) {
System.out.print(cities[choose][i]+",");
}
} else {
for(int i=0; i<cities.length; i++) {
for(int j=0; j<cities[i].length; j++) {
System.out.print(cities[i][j]+",");
}
System.out.println();
}
}
}