JAVA中数组使用StringBuffer拼接成字符串
String [] hobbies = customerBean.getHobbies();
if (hobbies != null && hobbies.length > 0) {
for (int i = 0; i < hobbies.length; i++) {
StringBuffer bf = new StringBuffer();
if (i>0) {
bf.append(",");
}
bf.append(hobbies[i]);
}
}