Check out example codes for "java split into arraylist". It will help you in understanding the concepts better.

Code Example 1

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(",")));

Learn ReactJs, React Native from akashmittal.com