AP Computer Science Amediummcq1 pt

The method list.indexOf(5) returns

A.the first index where 5 appears, or negative one
B.the last index where 5 appears
C.5 itself
D.the count of 5s

Explanation

Core Concept

indexOf finds the first match.

Correct Answer

Athe first index where 5 appears, or negative one

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 →