What is difference between Iterator and for loop
Answer Posted / bapi paul
An Iterator is an Object, which goes through a Collection
and you can do something with whatever the Iterator is
pointing at.
One big advantage is, that you don't have to know the size
of your Collection.
A Loop is a construct, that repeats something for a certain
amount of times.
One big advantage is, that you always know, at which
position you are.
Is This Answer Correct ? | 62 Yes | 5 No |
Post New Answer View All Answers
if u open login & logout ,how can udisplay the timelogin & logout members ?
Is java same as core java?
What is a ternary operator in java?
What are the wrapped, classes?
What all methods are used to prevent thread execution ?
What is data type modifier?
What does next mean in java?
What is package protected in java?
What is the list interface?
What is prefix of a string?
How to invoke external process in java.
How do you find the maximum number from an array without comparing and sorting?
Which is the class in java?
How do you check if two strings are equal in java?
What is the abstract class?