| 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
< 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.first();

B

numbers.get(1);

C

numbers.get(0);

D

numbers[0];

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.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy