arraylist remove all afte code example
Example: remove all entries of arraylist
//Creating the ArrayList
ArrayList names = new ArrayList<>();
//Removing all entries in the ArrayList using the clear() method
names.clear()
//Removing all entries in the ArrayList using the removeAll() method
names.removeAll(names)