1、数组遍历拼接返回单个变量 List<String> list =new Arrays.asList("a","b"); String str = list.stream().collect(Collectors.joining(","));