What is difference between Iterator and for loop
Answer Posted / tulasi ram damarla
Also, iterator is can be used with set to iterate and to
read an element from set. using for loop it is possible to
iterate,but you cannot read an element, because set does
not have a get() method.
Is This Answer Correct ? | 5 Yes | 6 No |
Post New Answer View All Answers
Can we define static methods inside interface?
What are green threads in java?
What is difference between next () and nextline () in java?
What is the difference between iterator and enumeration ?
Tell us something about different types of casting?
What’s the difference between unit, integration and functional testing?
What is difference between word and integer?
How can you handle java exceptions?
Differentiate between nested and inner class in java.
How would overload a function based on return type?
What is a string what operation can be performed out with the help of a string?
What do you mean by collectors in java 8?
Explain public static void main(string args[]) in java.
What is difference between null and void?
What’s the difference between the methods sleep() and wait()?