Java Quiz Day 36

Last Updated :
Discuss
Comments

Question 1

What is the purpose of the Java Collections Framework?

  • A

    To provide a set of classes for managing memory

  • B

    To provide a unified architecture for managing data collections

  • C

    To handle multithreading

  • D

    To enhance the performance of the JVM

Question 2

What is the purpose of the Collections class in Java?

  • A

    It is used to store data

  • B

    It provides utility methods for collection operations

  • C

    It is a type of collection

  • D

    It replaces ArrayList

Question 3

Which of the following is NOT part of the Java Collections Framework?

  • A

    LinkedList

  • B

    String

  • C

    TreeSet

  • D

    ArrayList

Question 4

Which of the following methods is provided by the Collections class in Java?

  • A

    addAll()

  • B

    sort()

  • C

    shuffle()

  • D

    all of the above

Question 5

Which of the following is true about the Collections class in Java?

  • A

    It cannot be inherited

  • B

    It is a subclass of AbstractList

  • C

    It contains static methods for working with collections

  • D

    It provides methods to manipulate a single collection

Question 6

Which of the following interfaces does NOT extend the Collection interface?

  • A

    List

  • B

    Set

  • C

    Map

  • D

    Queue

Question 7

What does the add() method in a Collection return?

  • A

    A boolean value indicating success or failure

  • B

    The added element



  • C

    A reference to the collection itself

  • D

    An index of the added element

Question 8

Which of the following is NOT a valid collection in the Java Collections Framework?

  • A

    Stack

  • B

    Vector

  • C

    Map

  • D

    Tree

Question 9

Which class provides a method to reverse the order of elements in a collection in Java?

  • A

    ArrayList

  • B

    Collections

  • C

    Vector

  • D

    HashSet

Tags:

There are 9 questions to complete.

Take a part in the ongoing discussion