Edit on Github instead
ArrayLists have an int size() method that returns the number of items in the list.
int size()
For example:
ArrayList<String> myList = new ArrayList<String>(); myList.add("Hello"); myList.add("Goodbye"); myList.add("Hi"); myList.size(); // returns 3
Suggest changes
Add links