java methods with arralist and string code example
Example 1: java how to create arraylist
import java.util.ArrayList;
//create ArrayList
ArrayList<String> arrayList = new ArrayList<String>();
Example 2: java arraylist
List<String> expenseTypeList = new ArrayList<>();
expenseTypeList.add("GENERAL");
expenseTypeList.add("PURCHASE");
expenseTypeList.add("PROJECT");