目录

数组转List

List转String

List转String[]


数组转List


        String[] arr = new String[] {"nnn", "io"};
        List list = Arrays.asList(arr);
        System.out.println(list);

List转String


        String result = String.join("-",list) ;
        System.out.println(result);

 

List转String[]
       String[] strArr = (String[]) list.toArray();
       System.out.println("\nString[]==>\n" + String.join(",",strArr));