QUESTION 1 The three types of collections supported by the Java Collections Fram
ID: 3732685 • Letter: Q
Question
QUESTION 1
The three types of collections supported by the Java Collections Framework (JCF) are named lists, sets, andmaps.
True
False
1 points
QUESTION 2
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
1) True
Java collection Framework supports three type of collections lists, sets, and maps
2) False
We can manipulate data using the inbuilt operations provided by Data Structure. We can store data as well as access the data stored.
3) True
ArrayList implements all the methods of Interface List
LinkedList implements the Queue, List and Deque methods of AbstractSequentialList
4) True
Stack is a Last In Last Out (LIFO) data structure. So we can only access the top element of the stack
5 )True
We can insert or we can delete elements from any position in a Linked List.
6)True
Since the size of an array does not change at the runtime, the runtime complexity of array is very good. So if we do not want to delete or insert elements in the list we can use array
7) True
According to Java documentation, Collection is sometime also known as container of group of objects.
8) True
9) False
Hashtable provides the most efficient way to to support random access through an index without inserting or removing elements from any place other than the end.
10) True
Queue is a First In First Out type. So while using a queue, elements are appended to the beginning of the queue removed from the end of the queue.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.