how to use add for a class object like list in java code example
Example: how to add an object to a list of objects in java
import java.util.ArrayList;
ArrayList<typeOfList> list = new ArrayList<typeOfList>();
// Example
ArrayList<String> list = new ArrayList<String>();