Home / Java Programming / Objects and Collections :: Discussion

Discussion :: Objects and Collections

  1. Which of the following are true statements?

    1. The Iterator interface declares only three methods: hasNext, next and remove.
    2. The ListIterator interface extends both the List and Iterator interfaces.
    3. The ListIterator interface provides forward and backward iteration capabilities.
    4. The ListIterator interface provides the ability to modify the List during iteration.
    5. The ListIterator interface provides the ability to determine its position in the List.

  2. A.
    2, 3, 4 and 5
    B.
    1, 3, 4 and 5
    C.
    3, 4 and 5
    D.
    1, 2 and 3

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The ListIterator interface extends the Iterator interface and declares additional methods to provide forward and backward iteration capabilities, List modification capabilities, and the ability to determine the position of the iterator in the List.


Be The First To Comment