initiralizing an arraylist java

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

Source

Also in Java: