Final answer:
The method used to obtain the present size of an object in an ArrayList is the size() method. It returns the number of elements currently in the list, whereas length is a property of arrays, and index and capacity are not applicable methods of the ArrayList class.
Step-by-step explanation:
The method of the ArrayList class used to obtain the present size of an object is size(). This method returns the number of elements in the ArrayList. Unlike arrays that have a fixed length and use the length field to determine their size, the ArrayList class provides the size() method to return the current number of elements.
For example, if you have an ArrayList called myList and you want to find out how many elements it contains, you would use the following code:
int numberOfElements = myList.size();
Options b. length(), c. index(), and d. capacity() are not methods of the ArrayList class; length is a property of arrays, index is not a standard method or property, and capacity() pertains to initial capacity, which is a concept not directly exposed by the ArrayList.