String chjyfw="第一类|宾馆;第一类|酒吧;第二类|理发店;第三类|舞厅;其它|卡拉OK;";
Map map = new HashMap();
if(chjyfw.contains(";")){
String []strArr_big = chjyfw.split(";"); for(int i=0;i<strArr_big.length;i++){
String strArr_small[] = strArr_big[0].split("|");
String temp = strArr_big[0];
strArr_small = temp.split("|");
map.put(strArr_small[0], strArr_small[1]);
}
}看看map里有什么内容,解释原因。
Map map = new HashMap();
if(chjyfw.contains(";")){
String []strArr_big = chjyfw.split(";"); for(int i=0;i<strArr_big.length;i++){
String strArr_small[] = strArr_big[0].split("|");
String temp = strArr_big[0];
strArr_small = temp.split("|");
map.put(strArr_small[0], strArr_small[1]);
}
}看看map里有什么内容,解释原因。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货