Why for each loop is used?



Why for each loop is used?..

Answer / Ram Pravesh Kumar

The for-each loop (also known as enhanced for loop) is used to iterate through collections such as arrays and ArrayLists, without the need to use an index.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Which access specifier can be used with class ?

1 Answers  


how many types of cloning?

4 Answers   Mobily,


Diff between Comparator and Comparable?

2 Answers   Aditya Birla,


What is replacefirst in java?

1 Answers  


What enableEvents() method do?

1 Answers  


what is Portal(web based online portal)?

2 Answers   AIG,


what is the use of abstract class?

3 Answers   Amdocs, Atos Origin, Invictus,


What are locale settings?

1 Answers  


what is Abstract DataType?

1 Answers  


In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

1 Answers  


What is double data type?

1 Answers  


What is an example of procedure?

1 Answers  


Categories