Activity 4.42.1.
How do you access the number of items in an ArrayList<String> called list?
-
list.length()
-
.length() is used with Arrays to return the number of items. Try again!
-
list.size
-
.size is a method call, so parentheses are required.
-
list.size()
-
Correct! ArrayLists use .size() to return the number of items in a list.



