Java8将数组转换为以特定符号相隔的String
public static void main(String[] args) {
List<String> list = Arrays.asList("北京","南京","重庆","西安");
String str1 = String.join("/",list);
System.out.println(str1);
String str2 = list.stream().collect(Collectors.joining("/"));
System.out.println(str2);
}