What is difference between Iterator and for loop

Answer Posted / sundarakannan d

The major difference is Iterator doesn't output the list we
are iterating in sequence.
where as in for we structure it to print in sequence.

Is This Answer Correct ?    6 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the four corner stones of oop?

549


who can i handle multiple client in RMI

1444


How list contains works in java?

558


Explain the hierarchy of java exception classes?

599


When is the finalize() called?

702






Can we make main() thread as daemon?

579


What are white spaces in java?

534


What is java lang string?

551


What is isa relationship?

567


What is the difference between an interface and an abstract class?

542


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

767


How do you remove duplicates in java?

530


What is the purpose of encapsulation?

545


Where is java located?

501


What is the difference between Java and C++?

616