
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
17 questions
Microprocessor - Intel 8088 - Part 1
Quiz
•
University
20 questions
Basic of Computer Networks - Quiz1
Quiz
•
University
16 questions
Flutter Quizzz
Quiz
•
University
20 questions
Sketup M1 รวม สาระเพิ่ม
Quiz
•
University
20 questions
8-期中总结
Quiz
•
University
20 questions
Designing Network Infrastructure and Network Security
Quiz
•
KG - University
15 questions
Kuis Pra Produksi Video
Quiz
•
12th Grade - University
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - 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
