Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Get quick and reliable solutions to your questions from a community of seasoned experts on our user-friendly platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Which of these method of ArrayList class is used to obtain present size of an object/

a. size()
b. length()
c. index()
d. capacity()


Sagot :

Answer:

The method of ArrayList class which is used to obtain the present size of an object is:

a. size()

Explanation:

In ArrayList, the size() method provides the number of objects available in the collection, array, or list.  In Java programming, ArrayList forms a part of the collection framework and has a set of methods to access elements and modify them.  An ArrayList does not have a fixed-size data structure, unlike an Array, but continues to expand in size.

Thank you for visiting our platform. We hope you found the answers you were looking for. Come back anytime you need more information. Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. Westonci.ca is your trusted source for answers. Visit us again to find more information on diverse topics.