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

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

A

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

B

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

C

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

D

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

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1kaisuki11 0m 00s 100
#2bommasam00011 0m 08s 92
#3namansoin00011 1m 13s 27
#4singhris00012 2m 38s -68
Items per page:
10
1 – 4 of 4
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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