What is foreach loop in java?



What is foreach loop in java?..

Answer / Sanjeev Gupta

In Java, the foreach loop (or for-each loop) provides a concise way to iterate over each element of a collection without using an index. It simplifies the code by automatically handling the underlying array or list index.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What about method local inner classes or local inner classes in java?

1 Answers  


How you can create a radio buttion using Checkbox class?

1 Answers  


Explain enumeration in java?

1 Answers  


Why main method is called first in java?

1 Answers  


How do you represent a space in regex java?

1 Answers  


What is merge sort in java?

1 Answers  


What are the concepts of 'OOPS'?

1 Answers   Atos Origin,


Is oracle charging for java?

1 Answers  


Can a static class have a constructor java?

1 Answers  


What is the range of the char type?

3 Answers  


how to deploy tomcatserver to weblogic server? write d following steps?

1 Answers  


What is use of functional interface in java 8? Explain

1 Answers  


Categories