Podcast
Questions and Answers
Which package in Java contains the ArrayList class?
Which package in Java contains the ArrayList class?
- java.collection
- java.lang
- java.util (correct)
- java.arraylist
What is the initial capacity of an empty ArrayList constructed using the default constructor?
What is the initial capacity of an empty ArrayList constructed using the default constructor?
- 10 (correct)
- 0
- 5
- 15
Which interface does the ArrayList class implement in Java?
Which interface does the ArrayList class implement in Java?
- Iterable
- Collection
- ArrayListInterface
- List (correct)
Flashcards are hidden until you start studying
Study Notes
ArrayList in Java
- The
ArrayList
class is contained in thejava.util
package. - An empty
ArrayList
constructed using the default constructor has an initial capacity of 10. - The
ArrayList
class implements theList
interface in Java.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.