| preferred AP College board partner for AP classes
AP Computer Science A/Unit 7: ArrayList
Start Practice Test
Share
easy Solved by 3 students
ArrayList Set Method Properties
< Prev
Next >

All of the following statements about the ArrayList set() method are true EXCEPT:

A

The set() method replaces the element at the specified index with a new element.

B

The set() method can add a new element to the ArrayList, increasing its size.

C

If an invalid index is provided, the set() method throws an IndexOutOfBoundsException.

D

The set() method returns the old element that was replaced.

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer

Question Leaderboard

Not enough data yet to show leaderboard.

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy