
java Collection Framework
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Prof Yetty
Used 1+ times
FREE Resource
Enhance your content in a minute
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which method would you use to retrieve an element at a specific index in an ArrayList?
Answer explanation
get() retrieves an element at the specified index in an ArrayList.
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What happens when you add an element to an ArrayList at an index greater than its size?
Answer explanation
Adding at an invalid index throws an IndexOutOfBoundsException.
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following operations are NOT supported by a Set?
Answer explanation
A Set does not allow adding duplicate elements.
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
True or False: A TreeSet maintains the insertion order of elements.
Answer explanation
A TreeSet orders elements naturally or via a comparator, not by insertion order.
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which method adds an element to the end of a Queue?
Answer explanation
offer() is used to add an element to the end of a Queue.
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which collection allows adding and removing elements from both ends efficiently?
Answer explanation
Deque allows adding and removing elements from both ends efficiently.
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What will happen if you try to retrieve an element from an empty PriorityQueue using remove()?
Answer explanation
remove() throws NoSuchElementException if the queue is empty.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Pra UAS Algoritma dan Pemrograman Lanjut
Quiz
•
University
20 questions
икт 21-40
Quiz
•
1st Grade - University
17 questions
Množice - zaloga
Quiz
•
University
15 questions
Teknik dalam Pemikiran Komputasional
Quiz
•
University
20 questions
DBTHON-23 Round-1
Quiz
•
University
20 questions
Spreadsheet Fundamentals - Quiz2
Quiz
•
University
15 questions
Javascript Array dan Object
Quiz
•
University
20 questions
IT Essential UIUX Chapter 03 (Typography)
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
