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
165 changes: 0 additions & 165 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,171 +4,6 @@ import clsx from 'clsx'
import Link from 'next/link'
import Router from 'next/router'

function BannerMarkMobile(props) {
return (
<svg fill="none" viewBox="0 0 848 513" {...props}>
<path
fill="#fff"
fillOpacity={0.1}
d="M424 0C310.94 0 240.26 56.944 212 170.811c42.4-56.944 91.86-78.295 148.4-64.054 32.266 8.114 55.311 31.686 80.836 57.777 41.552 42.489 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.295-148.4 64.054-32.245-8.114-55.311-31.686-80.836-57.777C577.212 49.193 529.088 0 424 0zM212 256.217c-113.06 0-183.74 56.944-212 170.812 42.4-56.945 91.86-78.296 148.4-64.055 32.245 8.114 55.311 31.686 80.836 57.777 41.552 42.49 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.296-148.4 64.054-32.245-8.113-55.311-31.685-80.836-57.777-41.552-42.489-89.676-91.683-194.764-91.683z"
/>
<path
stroke="#fff"
strokeOpacity={0.2}
d="M360.522 106.272l-.122.485.122-.485zm0 0c32.383 8.143 55.504 31.778 80.966 57.805l.105.107-.318.312.318-.311c20.78 21.248 43.155 44.121 73.45 61.692 30.282 17.564 68.498 29.84 120.957 29.84 56.444 0 102.26-14.213 137.486-42.595 34.73-27.982 59.217-69.776 73.424-125.433-20.822 27.449-43.355 46.428-67.609 56.898-24.842 10.723-51.456 12.503-79.823 5.358-32.389-8.15-55.544-31.819-81.032-57.872l-.039-.04.357-.35-.357.35c-20.78-21.25-43.155-44.122-73.449-61.693C514.675 12.777 476.459.5 424 .5c-56.444 0-102.26 14.213-137.486 42.595-34.73 27.982-59.217 69.776-73.424 125.434 20.822-27.45 43.355-46.429 67.609-56.898 24.842-10.723 51.456-12.504 79.823-5.359zm45.885 241.978l.286-.28-.286.28.039.04c25.488 26.053 48.643 49.722 81.032 57.872 28.367 7.145 54.981 5.365 79.823-5.358 24.254-10.47 46.787-29.449 67.609-56.898-14.207 55.657-38.694 97.452-73.424 125.433-35.226 28.382-81.042 42.595-137.486 42.595-52.459 0-90.675-12.276-120.957-29.84-30.295-17.571-52.67-40.443-73.45-61.692l-.337.329.337-.329-.039-.041c-25.488-26.053-48.643-49.722-81.032-57.872-28.367-7.145-54.98-5.364-79.823 5.359-24.254 10.469-46.787 29.448-67.609 56.898 14.207-55.657 38.694-97.452 73.424-125.434C109.74 270.93 155.556 256.717 212 256.717c52.459 0 90.675 12.277 120.957 29.841 30.295 17.57 52.67 40.443 73.45 61.692z"
/>
<path
stroke="url(#mark-mobile__paint0_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M647.5 120c-6-4.5-13.5-12.5-13.5-12.5"
/>
<path
stroke="url(#mark-mobile__paint1_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M212 256c11.118 0 21.598.551 31.5 1.586"
/>
<path
stroke="url(#mark-mobile__paint2_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M632.5 255.793c-11.118 0-21.598-.551-31.5-1.586"
/>
<defs>
<linearGradient
id="mark-mobile__paint0_linear"
x1={648.5}
x2={636.5}
y1={119.803}
y2={108}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
<linearGradient
id="mark-mobile__paint1_linear"
x1={220.5}
x2={245}
y1={256.783}
y2={257.783}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
<linearGradient
id="mark-mobile__paint2_linear"
x1={624}
x2={599.5}
y1={255.01}
y2={254.01}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
</defs>
</svg>
)
}

function BannerMarkLeft(props) {
return (
<svg fill="none" viewBox="0 0 848 513" {...props}>
<path
fill="#fff"
fillOpacity={0.1}
d="M424 0C310.94 0 240.26 56.944 212 170.811c42.4-56.944 91.86-78.295 148.4-64.054 32.266 8.114 55.311 31.686 80.836 57.777 41.552 42.489 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.295-148.4 64.054-32.245-8.114-55.311-31.686-80.836-57.777C577.212 49.193 529.088 0 424 0zM212 256.217c-113.06 0-183.74 56.944-212 170.812 42.4-56.945 91.86-78.296 148.4-64.055 32.245 8.114 55.311 31.686 80.836 57.777 41.552 42.49 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.296-148.4 64.054-32.245-8.113-55.311-31.685-80.836-57.777-41.552-42.489-89.676-91.683-194.764-91.683z"
/>
<path
stroke="#fff"
strokeOpacity={0.2}
d="M360.522 106.272l-.122.485.122-.485zm0 0c32.383 8.143 55.504 31.778 80.966 57.805l.105.107-.318.312.318-.311c20.78 21.248 43.155 44.121 73.45 61.692 30.282 17.564 68.498 29.84 120.957 29.84 56.444 0 102.26-14.213 137.486-42.595 34.73-27.982 59.217-69.776 73.424-125.433-20.822 27.449-43.355 46.428-67.609 56.898-24.842 10.723-51.456 12.503-79.823 5.358-32.389-8.15-55.544-31.819-81.032-57.872l-.039-.04.357-.35-.357.35c-20.78-21.25-43.155-44.122-73.449-61.693C514.675 12.777 476.459.5 424 .5c-56.444 0-102.26 14.213-137.486 42.595-34.73 27.982-59.217 69.776-73.424 125.434 20.822-27.45 43.355-46.429 67.609-56.898 24.842-10.723 51.456-12.504 79.823-5.359zm45.885 241.978l.286-.28-.286.28.039.04c25.488 26.053 48.643 49.722 81.032 57.872 28.367 7.145 54.981 5.365 79.823-5.358 24.254-10.47 46.787-29.449 67.609-56.898-14.207 55.657-38.694 97.452-73.424 125.433-35.226 28.382-81.042 42.595-137.486 42.595-52.459 0-90.675-12.276-120.957-29.84-30.295-17.571-52.67-40.443-73.45-61.692l-.337.329.337-.329-.039-.041c-25.488-26.053-48.643-49.722-81.032-57.872-28.367-7.145-54.98-5.364-79.823 5.359-24.254 10.469-46.787 29.448-67.609 56.898 14.207-55.657 38.694-97.452 73.424-125.434C109.74 270.93 155.556 256.717 212 256.717c52.459 0 90.675 12.277 120.957 29.841 30.295 17.57 52.67 40.443 73.45 61.692z"
/>
<path
stroke="url(#mark-left__paint0_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M212 256c11.118 0 21.598.551 31.5 1.586"
/>
<path
stroke="url(#mark-left__paint1_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M632.5 255.793c-11.118 0-21.598-.551-31.5-1.586"
/>
<defs>
<linearGradient
id="mark-left__paint0_linear"
x1={220.5}
x2={245}
y1={256.783}
y2={257.783}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
<linearGradient
id="mark-left__paint1_linear"
x1={624}
x2={599.5}
y1={255.01}
y2={254.01}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
</defs>
</svg>
)
}

function BannerMarkRight(props) {
return (
<svg fill="none" viewBox="0 0 848 513" {...props}>
<path
fill="#fff"
fillOpacity={0.1}
d="M424 0C310.94 0 240.26 56.944 212 170.811c42.4-56.944 91.86-78.295 148.4-64.054 32.266 8.114 55.311 31.686 80.836 57.777 41.552 42.489 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.295-148.4 64.054-32.245-8.114-55.311-31.686-80.836-57.777C577.212 49.193 529.088 0 424 0zM212 256.217c-113.06 0-183.74 56.944-212 170.812 42.4-56.945 91.86-78.296 148.4-64.055 32.245 8.114 55.311 31.686 80.836 57.777 41.552 42.49 89.676 91.683 194.764 91.683 113.06 0 183.74-56.944 212-170.811-42.4 56.944-91.86 78.296-148.4 64.054-32.245-8.113-55.311-31.685-80.836-57.777-41.552-42.489-89.676-91.683-194.764-91.683z"
/>
<path
stroke="#fff"
strokeOpacity={0.2}
d="M360.522 106.272l-.122.485.122-.485zm0 0c32.383 8.143 55.504 31.778 80.966 57.805l.105.107-.318.312.318-.311c20.78 21.248 43.155 44.121 73.45 61.692 30.282 17.564 68.498 29.84 120.957 29.84 56.444 0 102.26-14.213 137.486-42.595 34.73-27.982 59.217-69.776 73.424-125.433-20.822 27.449-43.355 46.428-67.609 56.898-24.842 10.723-51.456 12.503-79.823 5.358-32.389-8.15-55.544-31.819-81.032-57.872l-.039-.04.357-.35-.357.35c-20.78-21.25-43.155-44.122-73.449-61.693C514.675 12.777 476.459.5 424 .5c-56.444 0-102.26 14.213-137.486 42.595-34.73 27.982-59.217 69.776-73.424 125.434 20.822-27.45 43.355-46.429 67.609-56.898 24.842-10.723 51.456-12.504 79.823-5.359zm45.885 241.978l.286-.28-.286.28.039.04c25.488 26.053 48.643 49.722 81.032 57.872 28.367 7.145 54.981 5.365 79.823-5.358 24.254-10.47 46.787-29.449 67.609-56.898-14.207 55.657-38.694 97.452-73.424 125.433-35.226 28.382-81.042 42.595-137.486 42.595-52.459 0-90.675-12.276-120.957-29.84-30.295-17.571-52.67-40.443-73.45-61.692l-.337.329.337-.329-.039-.041c-25.488-26.053-48.643-49.722-81.032-57.872-28.367-7.145-54.98-5.364-79.823 5.359-24.254 10.469-46.787 29.448-67.609 56.898 14.207-55.657 38.694-97.452 73.424-125.434C109.74 270.93 155.556 256.717 212 256.717c52.459 0 90.675 12.277 120.957 29.841 30.295 17.57 52.67 40.443 73.45 61.692z"
/>
<path
stroke="url(#mark-right__paint0_linear)"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
d="M148.4 362.974c-20.178-5.082-39.454-5.631-57.83-1.648"
/>
<defs>
<linearGradient
id="mark-right__paint0_linear"
x1={106.175}
x2={151.193}
y1={360.811}
y2={362.062}
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#fff" />
<stop offset={1} stopColor="#fff" stopOpacity={0} />
</linearGradient>
</defs>
</svg>
)
}

export function Header({ navIsOpen, onNavToggle }) {
return (
<>
Expand Down
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
14 changes: 7 additions & 7 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ export default function Home() {
</p>
<div className="flex flex-wrap space-y-4 sm:space-y-0 sm:space-x-4 text-center mt-12 mb-28 ">
<NextLink href="/docs">
<a className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md hover:shadow-xl leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
<button className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md hover:shadow-xl leading-6 font-semibold py-3 px-6 border border-transparent rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
Get started
</a>
</button>
</NextLink>
<NextLink href="/">
<a className="w-full sm:w-auto flex-none bg-gray-900 hover:bg-gray-700 text-white text-lg shadow-md hover:shadow-xl leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-none transition-colors duration-200">
<button className="w-full sm:w-auto flex-none bg-gray-900 hover:bg-gray-700 text-white text-lg shadow-md hover:shadow-xl leading-6 font-semibold py-3 px-6 border border-transparent rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-none transition-colors duration-200">
Learn more
</a>
</button>
</NextLink>
<NextLink href="https://github.com/sponsors/javaistic">
<a
className="w-full sm:w-auto flex-none bg-gray-50 hover:bg-gray-100 text-md text-gray-900 font-semibold shadow-md hover:shadow-xl leading-6 py-3 sm:px-6 border-2 border-gray-300 rounded-xl flex items-center justify-center focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-300 focus:outline-none transition-colors duration-200"
<button
className="w-full sm:w-auto flex-none bg-gray-50 hover:bg-gray-100 text-md text-gray-900 font-semibold shadow-md hover:shadow-xl leading-6 py-3 sm:px-6 border-2 border-gray-300 rounded-lg flex items-center justify-center focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-300 focus:outline-none transition-colors duration-200"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -106,7 +106,7 @@ export default function Home() {
<path d="M18.7663 7.23375C18.3753 6.84262 17.9111 6.53234 17.4002 6.32065C16.8893 6.10896 16.3417 6 15.7887 6C15.2357 6 14.6881 6.10896 14.1772 6.32065C13.6663 6.53234 13.2021 6.84262 12.8112 7.23375L11.9998 8.04511L11.1884 7.23375C10.3987 6.44406 9.32768 6.00041 8.21089 6.00041C7.09409 6.00041 6.02303 6.44406 5.23334 7.23375C4.44365 8.02344 4 9.0945 4 10.2113C4 11.3281 4.44365 12.3991 5.23334 13.1888L6.0447 14.0002L11.9998 19.9553L17.9549 14.0002L18.7663 13.1888C19.1574 12.7979 19.4677 12.3337 19.6794 11.8228C19.891 11.3119 20 10.7643 20 10.2113C20 9.65828 19.891 9.11068 19.6794 8.59978C19.4677 8.08888 19.1574 7.6247 18.7663 7.23375V7.23375Z" />
</svg>
&nbsp;Sponsor
</a>
</button>
</NextLink>
</div>
</div>
Expand Down