Quiz on Java Collection

Quiz on Java Collection

University

20 Qs

quiz-placeholder

Similar activities

Python Recap

Python Recap

7th Grade - University

20 Qs

STM 2013 : FORMATIF T3-FORM & REPORT

STM 2013 : FORMATIF T3-FORM & REPORT

University

20 Qs

DWDM-2

DWDM-2

University

20 Qs

IGH Test de Entrada

IGH Test de Entrada

University

20 Qs

Chapter 1: Introduction to Computer

Chapter 1: Introduction to Computer

University

20 Qs

Computational Thinking in Python[Quiz 3]

Computational Thinking in Python[Quiz 3]

University

15 Qs

Micro Arch - CPUs & Fetch-Execute

Micro Arch - CPUs & Fetch-Execute

University

20 Qs

Python Basics

Python Basics

KG - University

16 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