数组到逗号分隔字符串
import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext;/**from n o w j a v a . c o m**/ public class Main{ public static void main(String[] argv) throws Exception{ String[] stringArray = new String[]{"1","abc","level",null,"nowjava.com","asdf 123"}; System.out.println(arrayToCommaSeparatedString(stringArray)); } public static String arrayToCommaSeparatedString(String[] stringArray) { StringBuilder result = new StringBuilder(); int count = 0; for (String value : stringArray) { if (count > 0) {