Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 01 The three types of collections supported by the Java Collections Fra

ID: 3732727 • Letter: Q

Question

QUESTION 01

The three types of collections supported by the Java Collections Framework (JCF) are named lists, sets,andmaps.

True

False

1 points   

QUESTION 02

A data structure stores only data, and supports no operations for accessing and manipulating the data.

True

False

1 points   

QUESTION 3

Examples of concrete implementations of the List interface are the ArrayList class and the LinkedList class are.

True

False

1 points   

QUESTION 4

When using a stack of elements, the elements are accessed only from the top of the stack.

True

False

1 points   

QUESTION 5

When choosing a list, if your application requires the insertion or deletion of elements from any place in the list, you should choose LinkedList.

True

False

1 points   

QUESTION 6

When choosing a list, if your application does not require insertion or deletion of elements, the most efficient data structure is the array.

True

False

1 points   

QUESTION 7

In Java, a collection is a container object that holds a group of objects, often referred to as elements.

True

False

1 points   

QUESTION 8

The JCF’s Stack class represents a last-in-last-out stack of objects.

True

False

1 points   

QUESTION 9

When choosing a list, if you need to support random access through an index without inserting or removing elements from any place other than the end, ArrayList offers the most efficient collection.

True

False

1 points   

QUESTION 10

When using a queue, elements are

appended to the beginning of the queue

removed from the end of the queue.

True

False

Explanation / Answer

QUESTION 01

The three types of collections supported by the Java Collections Framework (JCF) are named lists, sets,andmaps.

Answer:True

Explanation: In java collections frame work, there are basically 3 type of collections.

They are : List, Set, Map

QUESTION 02

A data structure stores only data, and supports no operations for accessing and manipulating the data.

Answer:False

Explanation: Data structure not only stores data but also provide operations to access and manipulating data.

QUESTION 3

Examples of concrete implementations of the List interface are the ArrayList class and the LinkedList class are.

Answer :True

Explanation: List is an interface in java collections, where ArrayList and LinkedList are classes which implement List.

QUESTION 4

When using a stack of elements, the elements are accessed only from the top of the stack.

Answer: True

Explanation: Stack is a datastructre where elements are accessd from the top of the stack. It follows Last in first out policy.

QUESTION 5

When choosing a list, if your application requires the insertion or deletion of elements from any place in the list, you should choose LinkedList.

Answer: True

Explanation: Because LinkedList internally uses double linked list and it does not need to shift bits to insert and delete elements. In ArrayList, cost of insertion and deletion operations are more.

QUESTION 6

When choosing a list, if your application does not require insertion or deletion of elements, the most efficient data structure is the array.

Answer: True

QUESTION 7

In Java, a collection is a container object that holds a group of objects, often referred to as elements.

Answer:True

Explanation: Collections are in java used to store object type data nothing but elements we call.

QUESTION 8

The JCF’s Stack class represents a last-in-last-out stack of objects.

Answer: False

Explanation:  Stack is a collection that is based on the last in first out (LIFO) principle.

QUESTION 9

When choosing a list, if you need to support random access through an index without inserting or removing elements from any place other than the end, ArrayList offers the most efficient collection.

Answer: True

QUESTION 10

When using a queue, elements are appended to the beginning of the queue removed from the end of the queue.

Answer: False

Explanation: Queue implemts or follows First-in First-Out(FIFO) policy. New elements are appended to the end of the queue and removed from the end of the queue as well.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote