Exam 2: Lists and the Collections Framework

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The Collection interface is the root of the collection hierarchy.

Free
(True/False)
4.9/5
(41)
Correct Answer:
Verified

False

____ testing refers to testing the smallest testable piece of software.

Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
Verified

C

The ____________________ interface is used to pass collections of data as a method parameter in the most general way.

Free
(Short Answer)
4.8/5
(36)
Correct Answer:
Verified

Collection

To obtain a ListIterator, you call the ____________________ method of the LinkedList class.

(Short Answer)
4.9/5
(32)

The language feature introduced in Java 5.0 called generic collections is also known as ___________________.

(Short Answer)
4.8/5
(40)

You could create a circular list from a single-linked list by executing the statement ____.

(Multiple Choice)
4.8/5
(50)

A Node is generally defined inside another class, making it a(n) _____________ class.

(Short Answer)
4.8/5
(37)

Give an example of an unboxing statement in Java 5.0.

(Short Answer)
4.8/5
(28)

Which of the following is a subclass of Vector?

(Multiple Choice)
4.9/5
(38)

A(n) ____________________ is a statement of any assumptions or constraints on the method data before the method begins execution.

(Short Answer)
4.9/5
(42)

Array reallocation is effectively an O(1) operation.

(True/False)
4.8/5
(40)

____ testing is system testing designed to show that the program meets its functional requirements.

(Multiple Choice)
4.7/5
(33)

The ArrayList<E> has the limitation that the add and remove methods operate in O(n2) time.

(True/False)
4.8/5
(37)

The ____ method, of the ArrayList<E> class, creates a new array that is twice the size of the current array and then copies the contents of the current array into the new one.

(Multiple Choice)
4.9/5
(37)

The Node class for a double-linked list has references to the data and to the next and previous nodes.

(True/False)
4.8/5
(38)

A(n) ____ is an indexed data structure, which means you can select its elements in arbitary order as determined by the subscript value.

(Multiple Choice)
4.9/5
(38)

____________________ types allow us to define a collection such as an ArrayList of a specific type.

(Short Answer)
4.7/5
(35)

If you want to remove two consequtive elements in a list, a separate call to ____________________ must occur before each call to remove.

(Short Answer)
4.9/5
(43)

The replacement for a method that has not yet been implemented or tested is called a(n) ____________________.

(Short Answer)
4.9/5
(36)

The ArrayList<E> class is part of the package called ____________________.

(Short Answer)
4.9/5
(42)
Showing 1 - 20 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)