A constructor for an array-based list takes an integer parameter,to be used as the capacity of the internal array of the list.Which exception should the constructor throw if its parameter is zero or negative?
A) IllegalArgumentException
B) IllegalStateException
C) RuntimeException
D) NullPointerException
Correct Answer:
Verified
Q4: If a new element is added to
Q5: Assume an array-based list implemented by a
Q6: What is the difference between the Iterator
Q7: Assume an array-based list implemented by a
Q8: The int indexOf(Object o)method of the List
Q10: The difference between an array and an
Q11: Assume an array-based list implemented by a
Q12: The E get(int index)method of the List
Q13: Why does the Java Collections Framework define
Q14: A new element is added to an
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents