
Collections
Quiz
•
Information Technology (IT)
•
University
•
Practice Problem
•
Medium
Yosuva Sirumani
Used 3+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
1. Which interface is the root interface in the Java Collection hierarchy?
A. Collection
B. Map
C. Iterable
D. List
2.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
2. What is the main difference between ArrayList and LinkedList?
A. ArrayList is thread-safe, LinkedList is not
B. LinkedList allows duplicate elements, ArrayList doesn't
C. ArrayList uses a dynamic array, LinkedList uses nodes
D. LinkedList is faster for indexing
3.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
3. Which of these classes implements the Set interface?
A. HashMap
B. ArrayList
C. HashSet
D. TreeMap
4.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
4. Which method is used to remove all elements from a Collection?
A. clear()
B. deleteAll()
C. removeAll()
D. erase()
5.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
5. What will the following code output?
Set<String> set = new HashSet<>();
set.add("Apple");
set.add("Banana");
set.add("Apple");
System.out.println(set.size());
A. 1
B. 2
C. 3
D. Compilation Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6. Which class guarantees that the order of elements will remain the same as inserted?
A. HashSet
B. TreeSet
C. LinkedHashSet
D. PriorityQueue
7.
MULTIPLE CHOICE QUESTION
30 sec • 20 pts
7. What is the output of this code snippet?
Map<String, Integer> map = new HashMap<>();
map.put("A", 100);
map.put("B", 200);
map.put("A", 300);
System.out.println(map.get("A"));
A. 100
B. 200
C. 300
D. Null
Create a free account and access millions of resources
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
10 questions
15-JS Методы массивов (продолжение)
Quiz
•
University
15 questions
PRELIMS Quiz Game (FOS)
Quiz
•
University
15 questions
Python for loop/lists
Quiz
•
9th Grade - University
10 questions
NoSQL - PR5 & PR6 quiz
Quiz
•
University
12 questions
Revisão N2
Quiz
•
University
10 questions
Kuis Informatika kela X
Quiz
•
10th Grade - University
12 questions
CLC Unit 2 Lesson 1,2,3 and 4 Quiz
Quiz
•
University
15 questions
MS Access
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
