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

Code Example 1

ArrayList<Type> str = new ArrayList<Type>();
       str.add("Geeks");
       str.add("for");
       str.add("Geeks");

Learn ReactJs, React Native from akashmittal.com