What is the difference between length() and size() of ArrayList?
(a) length() and size() return the same value
(b) length() is not defined in ArrayList
(c) size() is not defined in ArrayList
(d) length() returns the capacity of ArrayList and size() returns the actual number of elements stored in the list
The question was posed to me in an interview.
The query is from Data Structures-List in section java.util – The Collections Framework of Java