去字符串最后一个逗号
for (int t = 0; t < memberLen; t++) {
??????memTemp =? stafferMap.get(strMember[t]);
??????if(memTemp != null){
???????memberNames += memTemp + ",";
??????}
?????}
以上的代码,拼接的字符串会多一个“,”,比如:"str1,str2,str3,",要去除str3后的逗号,可用如下方法:
?????
?????memberNames = memberNames.substring(0,memberNames.length()-1);