[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Technical Discussion :: Java

11 / 66

What is an Iterator ? How do you traverse through a collection using its Iterator?

Answer:

Iterator allows to traverse the collection and also it has methods which enables to obatin or remove elements. ListIterator adds the feature of traversing the list bi-directionally, also modify the elememts.



Eg.: Iterator itr = al.iterator();



       while(itr.hasNext()) {}

Asked In :: iGateSyntel Inc.Accenture

Post Your Answer Here:


Rate This: +1 -0      +
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Rate This: +0 -0     
Report    

Post Your Reply Here:

Alert me
q4i-reply-your-answer

Report Error

Please Login First Click Here

Most Popular Qs.