how to remove all item from anentire arraylist java 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)