AP Computer Science Aeasymcq1 pt

The method list.add(0, 9) does what?

A.inserts 9 at index 0 and shifts the rest right
B.appends 9 at the end
C.replaces index 0 with 9
D.removes index 0

Explanation

Core Concept

Two-argument add inserts.

Correct Answer

Ainserts 9 at index 0 and shifts the rest right

More Unit 7: ArrayList practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 7: ArrayList Questions →