1.

Which of these methods is used to obtain an iterator to the start of collection?(a) start()(b) begin()(c) iteratorSet()(d) iterator()The question was asked during an internship interview.This interesting question is from Iterators in division java.util – The Collections Framework of Java

Answer»

Correct answer is (d) ITERATOR()

For explanation I would SAY: To OBTAIN an iterator to the start of the start of the collection we use iterator() METHOD.



Discussion

No Comment Found

Related InterviewSolutions