Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update if-else-statement.mdx
  • Loading branch information
arghyaxcodes committed Dec 3, 2021
commit b9b0d56271f8d22ba544e0dca7cc590891979dd2
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