Skip to content
Ravnary
A Knowledge Platform
Categories
Learn
Cheatsheets
Paths
Favourites
Review
Community
Colour theme
Light
Dark
System
Learn
Java Collections and Streams
Collections
The Collections Framework
Quiz
Q 01
/ 05
Intermediate
Question 1 of 5. 0 correct, 0 incorrect.
A method walks its argument and never indexes it. Which parameter type leaves the caller the most freedom while still saying what the method needs?
Collection<String>
ArrayList<String>
, because it is the most precise
List<String>
, because it is an interface too
Check answer
Home
Learn
Paths
Saved
Community