Page 1 of 1

What is the difference between length() and size() of ArrayList?

Posted: Wed Jul 13, 2022 7:46 pm
by answerhappygod
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