
Java Collection maps
Quiz
•
Computers
•
University
•
Hard
A Vijay Kumar
Used 1+ times
FREE Resource
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Penginderaan Jauh 2023
Quiz
•
University
20 questions
Soal Informatika kelas 7
Quiz
•
12th Grade - University
21 questions
SAINS KOMPUTER TINGKATAN 4 (BAB1)
Quiz
•
KG - University
23 questions
OCR J275 - Data Representation
Quiz
•
KG - University
20 questions
Kuis 2 - PKS 1
Quiz
•
University
20 questions
1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni
Quiz
•
University - Professi...
20 questions
8-期中总结
Quiz
•
University
20 questions
basisdata1
Quiz
•
University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
