Interviews2 answers
What Types of Loops Does Java Support?
2 Answers
Hey User,
Java Supports different types of Loop like-
1:- While Loop.
2:- Do while Loop.
3:- For Loop.
4:- Foreach Loop.
Shashank PathakPosted Nov 2, 2019, 10:07 PM EDT
Java Supports the following :
- for loop
for(initialization condition; testing condition; increment/decrement){statements(s)}
- for-each loop
for (type var: array){statements(s)}
- while loop
while( condition){Statements}
- do-while loop
do{statement(s)}while
for a detailed tutorial on Java Control and Loop statements please visit https://www.c-sharpcorner.com/article/java-loops-and-control-statements/
Rohit GuptaPosted Sep 16, 2019, 10:37 PM EDT


