
Quiz on Java Collection

Quiz
•
Computers
•
University
•
Hard
Jagadish Sahoo
Used 10+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of these packages contain all the collection classes?
java.lang
java.util
java.net
java.awt
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of these classes is not part of Java’s collection framework?
Maps
Array
Stack
Queue
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of this interface is not a part of Java’s collection framework?
List
Set
SortedMap
SortedList
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of these methods deletes all the elements from invoking collection?
clear()
reset()
delete()
refresh()
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is Collection in Java?
A group of objects
A group of classes
A group of interfaces
None of the mentioned
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
import java.util.*;
class Array
{
public static void main(String args[])
{
int array[] = new int [5];
for (int i = 5; i > 0; i--)
array[5-i] = i;
Arrays.fill(array, 1, 4, 8);
for (int i = 0; i < 5 ; i++)
System.out.print(array[i]);
}
}
12885
12845
58881
54881
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
import java.util.*;
class Bitset
{
public static void main(String args[])
{
BitSet obj = new BitSet(5);
for (int i = 0; i < 5; ++i)
obj.set(i);
obj.clear(2);
System.out.print(obj);
}
}
{0, 1, 3, 4}
{0, 1, 2, 4}
{0, 1, 2, 3, 4}
{0, 0, 0, 3, 4}
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Flutter intro and Dart quiz

Quiz
•
University
15 questions
Seatwork (SEQUENTIAL CONTAINER TYPES) data structure

Quiz
•
University
25 questions
Web Mania - (Round 1)

Quiz
•
University
20 questions
loops and iterables in python

Quiz
•
University
20 questions
Classes Relationships in Java Programming

Quiz
•
University
20 questions
Fundamentos JAVA

Quiz
•
University
15 questions
Java Programming

Quiz
•
University
15 questions
REACTOR

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University