What are Loops in Java? What are three types of loops?

By ayush goel in 22 Sep 2023 | 11:19 am
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

What are Loops in Java? What are three types of loops?

22 Sep 2023 | 11:19 am
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

- Loops in Java are used to execute a block of code repeatedly. Three types of loops:

     - `for` loop: Used for iterating over a range.

     - `while` loop: Continues execution as long as a condition is true.

     - `do-while` loop: Similar to `while` loop but guarantees execution at least once.

22 Sep 2023 | 05:15 pm
0 Likes

Report

Please describe about the report short and clearly.