can be written as:
a. List<> list = new ArrayList<>();
b. List<> list = new ArrayList<String>();
c. List<String> list = new ArrayList<>();
d. List<String> list = new ArrayList();
16.6.2 Q1: LinkedList method listIterator returns a(n) __________.
a. Iterator.
b. List.
c. sub list.
d. bidirectional iterator.
16.6.2 Q2: Which statement is false?
a. When a List is backed by an array, any modifications made through the List view change the
array.
b. When a List is backed by an array, any modifications made to the array change the List view.
c. The only operation permitted on the view returned by Arrays method asList is delete, which
deletes the value from the view and the backing array.
d. Adding elements to the view returned by Arrays method asList results in an
UnsupportedOperationException.
16.7 Q1: The collections framework algorithms are __________, i.e., each of these algorithms can operate on objects
that implement specified interfaces without concern for the underlying implementations.
a. stable.
b. lexicographical.
c. polymorphic.
d. implementation dependent.
16.7.1 Q1: Collections method sort that accepts a List as an argument. It sorts the List elements,
which must implement the __________ interface.
a. Comparable.
b. Comparator.
c. Compare.
d. Ordering.
16.7.1 Q2: Collections method ___________ returns a Comparator object that orders the collection’s
elements in reverse order.
a. rotate.
b. shuffle.
c. reverse.
d. reverseOrder.