Quiz on Java Collection

Quiz on Java Collection

University

20 Qs

quiz-placeholder

Similar activities

Microsoft Word Quiz

Microsoft Word Quiz

University

15 Qs

Lenguaje de Definición de Datos

Lenguaje de Definición de Datos

University

18 Qs

Intro to Data Mining

Intro to Data Mining

University

15 Qs

Java Quiz 3

Java Quiz 3

University

15 Qs

JAVA - Arrays

JAVA - Arrays

University - Professional Development

15 Qs

PBO Inheritance Episode 2

PBO Inheritance Episode 2

University

18 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

OS(II UNIT)

OS(II UNIT)

University

15 Qs

Quiz on Java Collection

Quiz on Java Collection

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Jagadish Sahoo

Used 10+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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?

  1. import java.util.*;
  2. class Array

  3. {

  4. public static void main(String args[])

  5. {

  6. int array[] = new int [5];

  7. for (int i = 5; i > 0; i--)

  8. array[5-i] = i;

  9. Arrays.fill(array, 1, 4, 8);

  10. for (int i = 0; i < 5 ; i++)

  11. System.out.print(array[i]);

  12. }

  13. }

12885

12845

58881

54881

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Java program?

  1. import java.util.*;
  2. class Bitset

  3. {

  4. public static void main(String args[])

  5. {

  6. BitSet obj = new BitSet(5);

  7. for (int i = 0; i < 5; ++i)

  8. obj.set(i);

  9. obj.clear(2);

  10. System.out.print(obj);

  11. }

  12. }

{0, 1, 3, 4}

{0, 1, 2, 4}

{0, 1, 2, 3, 4}

{0, 0, 0, 3, 4}

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers