Big Java Binder Early Objects

Computing

Quiz 15 :

The Java Collections Framework

Quiz 15 :

The Java Collections Framework

Question Type
search
arrow
A collection that remembers the order of items, and allows items to be added and removed only at one end is called a ____.
Free
Multiple Choice
Answer:

Answer:

B

Tags
Choose question tag
close menu
arrow
A stack is a collection that ____.
Free
Multiple Choice
Answer:

Answer:

A

Tags
Choose question tag
close menu
arrow
Rather than storing values in an array, a linked list uses a sequence of ____.
Free
Multiple Choice
Answer:

Answer:

B

Tags
Choose question tag
close menu
arrow
Which nodes need to be updated when we insert a new node to become the fourth node from the beginning of a doubly-linked list?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
We might choose to use a linked list over an array list when we will not require frequent ____. I random access II inserting new elements III removing of elements
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A linear search only requires ____ access.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Which of the following statements about linked lists is correct?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A collection without an intrinsic order is called a ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Consider the following code snippet: LinkedList<String> words = new LinkedList<String>(); Words.addLast("abc"); Words.addLast("def"); Words.addLast("ghi"); System.out.print(words.removeLast()); System.out.print(words.removeFirst()); System.out.print(words.removeLast()); What will this code print when it is executed?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Which data structure would best be used for keeping track of a growing set of groceries to be purchased at the food market?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
What is included in a linked list node? I a reference to its neighboring nodes II an array reference III a data element
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
What type of access does a LinkedList provide for its elements?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A collection that allows speedy insertion and removal of already-located elements in the middle of it is called a ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Which of the following algorithms would be efficiently executed using a LinkedList?
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
The ArrayList class implements the ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A list is a collection that ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A collection that allows items to be added only at one end and removed only at the other end is called a ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Select an appropriate expression to complete the following code segment, which is designed to print a message if the string stored in name is part of the players collection. Collection<String> players = new ArrayList<String>(); // code to add elements to the collection here If ______________________________________ System.out.print(name + " is one of the players in the collection.");
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A queue is a collection that ____.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
A binary search requires ____ access.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 110