Quiz on Java Collection

Quiz on Java Collection

University

20 Qs

quiz-placeholder

Similar activities

OOP-A2-quiz

OOP-A2-quiz

University

20 Qs

Java Basic - Core

Java Basic - Core

University

20 Qs

Online Test-3 ( Wipro Talent Next )- 30th July 2020

Online Test-3 ( Wipro Talent Next )- 30th July 2020

University

20 Qs

MCQs on Java Collections Framework

MCQs on Java Collections Framework

University

20 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Java - Revisão I

Java - Revisão I

University

20 Qs

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

quiz 2nd/3rd year

quiz 2nd/3rd year

University

21 Qs

Quiz on Java Collection

Quiz on Java Collection

Assessment

Quiz

Computers

University

Hard

Created by

Jagadish Sahoo

Used 8+ 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?

  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}

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?