Conversion between list and string array

List is converted to a String array

 public static void main(String[] args) {
List<String> list=new ArrayList<String>();
list.add("1");
list.add("2");
System.out.println(list);
String[] strings =list.toArray(new String[list.size()]);
for (String s:strings
     ) {
    System.out.println(s);
}
}

String array converted to List

  public static void main(String[] args) {
    String[] a=new String[]{"1","2"};

        List list= Arrays.asList(a);
        System.out.println(list);
    }

Read More: