What are Loops in Java? What are three types of loops?
- 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.