Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 7: ArrayList
Start Practice TestPractice Test
About Exam
easy Solved by 2 students

ArrayList Element Retrieval

Mark
< Prev
Next >

Consider the following declaration.

ArrayList<Integer> numbers = new ArrayList<>();

Which code snippet correctly retrieves the first element from the numbers list?

A

numbers.get(0);

B

numbers[0];

C

numbers.first();

D

numbers.get(1);

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

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

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