+ 1
What is a loop?
2 Answers
+ 2
It is a structure, series, or process, the end of which is connected to the beginning.
Now in terms of programming : A loop statement allows us to execute a statement or group of statements multiple times and following is the general from of a loop statement in most of the programming languages.
Now with context to java : Java programming language provides the following types of loop to handle looping requirements.Â
a. while loop
b. for loop
c. do-while loop
You may have seen Enhanced for loopÂ
As of Java 5, the enhanced for loop was introduced. This is mainly used to traverse collection of elements including arrays.
Syntax
for(declaration : expression) {
// Statements
}
0
It is where you put the output and direct theinput



