Download Questions on Dynamic Arrays and more Exercises Computer science in PDF only on Docsity!
Smithi Gopalakrishnan 3 Questions about Dynamic Arrays (ArrayLists)
Where does the add method in an ArrayList store the new element? a. At index 0 b. At index 1 c. In the middle of the array d. At the end of the array
What method is used to get the number of elements in an ArrayList object? a. length() b. size() c. range() d. set()
Which ArrayList method is overloaded (same method name but can have a varying amount of parameters)? a. get() b. add() c. size() d. set() e. remove() f. clear() Answers: