Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/img/docs/wroking-of-if-else-statement.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/docs/wroking-of-java-if-statement.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/img/docs/wroking-of-java-statement.svg

This file was deleted.

30 changes: 24 additions & 6 deletions src/pages/docs/if-else-statement.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Here, `condition` is a boolean expression such as `age >= 18`.
<NextImage
className="object-cover object-center shadow-xl"
alt="Working of Java if statement"
src={require('@/img/docs/wroking-of-java-statement.svg').default}
width={1145}
height={620}
src={require('@/img/docs/wroking-of-java-if-statement.svg').default}
width={1141}
height={596}
layout="responsive"
blurDataURL={require('@/img/docs/wroking-of-java-statement.svg').default}
blurDataURL={require('@/img/docs/wroking-of-java-if-statement.svg').default}
placeholder="blur"
loading="lazy"
quality={100}
Expand Down Expand Up @@ -126,8 +126,26 @@ else {
Here, the program will do one task (codes inside if block) if the condition is true and another task (codes inside else block) if the condition is false.

## How the if...else statement works?
If the condition is true, the code inside the if block is executed, otherwise, code inside the else block is executed
Working of Java if-else statements

<div>

<NextImage
className="object-cover object-center shadow-xl"
alt="Working of Java if statement"
src={require('@/img/docs/wroking-of-if-else-statement.svg').default}
width={1314}
height={690}
layout="responsive"
blurDataURL={require('@/img/docs/wroking-of-if-else-statement.svg').default}
placeholder="blur"
loading="lazy"
quality={100}
/>

<p align="center" className="text-base text-gray-600 font-medium">Working of Java if-else statements</p>

</div>


### Example 3: Java if...else Statement

Expand Down