Skip to content

Commit

Permalink
Control flow statements in Java
Browse files Browse the repository at this point in the history
  • Loading branch information
eazybytes authored Apr 2, 2024
1 parent 51756db commit 71f732a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions section8/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ public class SwitchExpressionDemo {
In Java, the `while` statement is a control flow statement that repeatedly executes a block of code as long as a specified condition is true. It is used when the number of iterations is not known beforehand and depends on the condition being evaluated.
### Syntax
```java
```java
while (condition) {
// Code block to be executed
}
Expand Down Expand Up @@ -254,7 +253,6 @@ public class WhileStatementDemo {
In Java, a do-while statement is used to execute a block of code repeatedly until a specified condition evaluates to false. Unlike the while loop, the do-while loop ensures that the block of code is executed at least once, even if the condition is initially false.
### Syntax
```java
```java
do {
// code block to be executed
} while (condition);
Expand Down

0 comments on commit 71f732a

Please sign in to comment.