create an array list code example
Example 1: java how to create arraylist
import java.util.ArrayList;
//create ArrayList
ArrayList arrayList = new ArrayList();
Example 2: how to create an array list in java
List list = new ArrayList<>();
import java.util.ArrayList;
//create ArrayList
ArrayList arrayList = new ArrayList();
List list = new ArrayList<>();