
Java Collection maps
Quiz
•
Computers
•
University
•
Hard
A Vijay Kumar
Used 1+ times
FREE Resource
Enhance your content in a minute
24 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is faster and uses less memory?
ListEnumeration
Iterator
Enumeration
ListIterator
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which interface does java.util.Hashtable implement?
Java.util.Map
Java.util.List
Java.util.HashTable
Java.util.Collection
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Find the output
public class TreeMapTest {
public static void main(String args[]) {
Map<Integer, String> m = new TreeMap<Integer, String>();
m.put(11, "audi");
m.put(null, null);
m.put(11, "bmw");
m.put(null, "ferrari");
System.out.println(m.size());
System.out.println(m);
}
Nullpointer exception
compiler error
2
Null value
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
public class MyClass {
public static void main(String args[]) {
Map<String, String> hashMap = new HashMap<String, String>();
hashMap.put(new String("a"), "audi");
hashMap.put(new String("a"), "ferrari");
System.out.println(hashMap);
}
}
a=audi
a=audi
a=ferrari
a=ferrari
Run time Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is synchronized?
TreeMap
HashMap
Hashtable
All of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you sort given HashMap on basis of values
Implement Comparator interface and override its compare method
It is not possible
Implement Comparator interface and override its compareTo method
Implement Comparator interface and override its comparable method
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statement is not True about Generics in java?
Generics are features of the Java programming language that allow programmers to write parameterized code.
With generics, the compiler can not detect violations at compile time, thus eliminating potential bugs.
Due to the demand of safer code, generics were added to the Java programming language.
generics allow you to write generic code
Stronger type checks at compile time
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
20 questions
การพัฒนาเว็บเพจด้วยภาษา PHP
Quiz
•
University
20 questions
Clasificación de requisitos
Quiz
•
University
20 questions
Information Management - QUIZ
Quiz
•
University
19 questions
Shortest Path Algorithms and AI
Quiz
•
12th Grade - University
20 questions
Programming2
Quiz
•
University
20 questions
js DOM
Quiz
•
12th Grade - Professi...
23 questions
Quiz2_TAFL (Session 2023-24)
Quiz
•
University
20 questions
แบบทดสอบ Python เบื้องต้น P6
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 Computers
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
