What Is The Difference Between Length And Size Of Arraylist #687
What is the difference between length() and size() of ArrayList?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Util Collections Framework - Java List - Quiz No.1.
What is the difference between length() and size() of ArrayList?
length() and size() return the same value
length() is not defined in ArrayList
size() is not defined in ArrayList
length() returns the capacity of ArrayList and size() returns the actual number of elements stored in the list