
java-Collections(part-II)-vlits

Quiz
•
Computers
•
1st Grade
•
Hard
kolla vivek
Used 4+ times
FREE Resource
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following are true statements?
1.The Iterator interface declares only three methods: hasNext, next and remove. 2.The ListIterator interface extends both the List and Iterator interfaces.
3.The ListIterator interface provides forward and backward iteration capabilities.
4.The ListIterator interface provides the ability to modify the List during iteration.
5.The ListIterator interface provides the ability to determine its position in the List.
2, 3, 4 and 5
1, 3, 4 and 5
3, 4 and 5
1, 2 and 3
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?
java.util.ArrayList
java.util.LinkedHashMap
java.util.HashMap
java.util.TreeMap
3.
MULTIPLE CHOICE QUESTION
15 mins • 1 pt
What will be the output of the program?
TreeSet map = new TreeSet();
map.add("one");
map.add("two");
map.add("three");
map.add("four");
map.add("one");
Iterator it = map.iterator();
while (it.hasNext() )
{
System.out.print( it.next() + " " );
}
one two three four
four three two one
four one three two
one two three four one
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which statement is true for the class java.util.ArrayList?
The elements in the collection are ordered.
The collection is guaranteed to be immutable.
The elements in the collection are guaranteed to be unique.
The elements in the collection are accessed using a unique key.
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?
java.util.SortedMap
java.util.TreeMap
java.util.TreeSet
java.util.Hashtable
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will be the output of the program?
public static void main(String[] args)
{
Object obj = new Object()
{
public int hashCode()
{
return 42;
}
};
System.out.println(obj.hashCode());
}
42
Runtime Exception
Compile Error at line 2
Compile Error at line 5
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of these is not a interface in the Collections Framework?
Collection
Group
set
List
Create a free account and access millions of resources
Similar Resources on Wayground
32 questions
программалау 3тест

Quiz
•
1st - 5th Grade
31 questions
Std 1 Computer Practice Set

Quiz
•
1st Grade
27 questions
Inventory Management Quiz

Quiz
•
1st Grade
31 questions
Topic 1 Quiz

Quiz
•
1st - 9th Grade
28 questions
Python по занятиям

Quiz
•
1st - 10th Grade
25 questions
Mid term Exam

Quiz
•
KG - Professional Dev...
26 questions
Blockchain Day1

Quiz
•
1st Grade
25 questions
Revisão Dispositivos Móveis

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
18 questions
D189 1st Grade OG 1c Concept 37-38

Quiz
•
1st Grade
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
5 questions
Life at a pond

Quiz
•
1st Grade
14 questions
Plural Nouns Adding s and es

Quiz
•
1st - 2nd Grade