6. 

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.

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

7. 

Which statement is true for the class java.util.ArrayList?

A. The elements in the collection are ordered.
B. The collection is guaranteed to be immutable.
C. The elements in the collection are guaranteed to be unique.
D. The elements in the collection are accessed using a unique key.