SOFTWARE DESIGN
DESIGN PATTERNS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Using an iterator may be more efficient than going through elements of some specialized collections directly.
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Explanation:
Detailed explanation-1: -The Iterator interface is used to iterate over the elements in a collection ( List, Set, or Map ). It is used to retrieve the elements one by one and perform operations over each one if need be.
Detailed explanation-2: -Ability to remove elements from Collections. Ability to move forward and backward using next() and previous() . Ability to check if there more elements or not by using hasNext() . 08-Mar-2014
There is 1 question to complete.