java split into arraylist

Java
input = "aaa,bbb,ccc";

// To array
String[] arr = input.split(",");

// To fixed-size list
List<String> l = Arrays.asList(input.split(","));

// To ArrayList
List<String> l2 = new ArrayList<>(Arrays.asList(input.split(",")));

Source

Also in Java: