String reg_name=reg.getXm();
String reg_ic=reg.getIc();
StringBuffer namebf=new StringBuffer();
String[] a=StringUtils.split(reg_name, ",");//[abc,bcd,dcd,faad]
String[] b=StringUtils.split(reg_ic, ",");//[12,21,23,34]
for(int i=0;i<a.length;i++){
if(StringUtils.isNotBlank(reg_ic)&&b.length==a.length){
a[i]=a[i]+"("+b[i]+")";
}
} get
StringUtils.join(a, ",") it
結果:abc(12),bcd(21),dcd(23),faad(34) join