in Education by
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 Select the correct answer from above options

1 Answer

0 votes
by
 
Best 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.

Related questions

0 votes
    Which of these methods can be used to obtain set of all keys in a map? (a) getAll() (b) getKeys( ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to move to next element in a collection? (a) next() (b) move() ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods is used to obtain an iterator to the start of collection? (a) start() (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these methods deletes all the elements from invoking collection? (a) clear() (b) reset() (c) ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these return type of hasNext() method of an iterator? (a) Integer (b) Double (c) Boolean (d ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method Map class is used to obtain an element in the map having specified key? (a) ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method is used to add an element to the start of a LinkedList object? (a) add() (b ... The Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these is a method of ListIterator used to obtain index of previous element? (a) previous() (b ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these method of Locale class can be used to obtain country of operation? (a) getCountry() (b) ... Utility Classes of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which of these is an incorrect form of using method max() to obtain a maximum element? (a) max( ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to delete the last element in a LinkedList object? (a) remove() (b ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods is used to retrieve the elements in properties object at specific location? (a) get() ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods is used to notify observer the change in observed object? (a) update() (b) notify() ... Utility Classes of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which of these methods can convert an object into a List? (a) SetList() (b) ConvertList() (c) ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these standard collection classes implements a linked list data structure? (a) AbstractList (b) LinkedList ... of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
...