Q. Which interface is used to iterate over a collection?

A
Iterable
B
Iterator
C
Collection
D
List
Solution:

The Iterator interface provides methods like hasNext() and next() to traverse a collection.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!