Java Programs
- Start coding right now or go through Java code.
+ A bunch of Java programms for learning and practicing.
Start learning
-
From 85bf7ec87b10393d203cdc7d41943b6c29c4e74a Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Tue, 7 Dec 2021 20:22:34 +0530
Subject: [PATCH 42/99] Update sitemap.xml
---
public/sitemap.xml | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/public/sitemap.xml b/public/sitemap.xml
index f525a794..b5b2e5b2 100644
--- a/public/sitemap.xml
+++ b/public/sitemap.xml
@@ -9,87 +9,92 @@
https://javaistic.vercel.app/
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
1.00
https://javaistic.vercel.app/docs
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/docs/installation
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/programs/introduction
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/programs
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/brand
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/sponsors
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.80
https://javaistic.vercel.app/docs/introduction
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/hello-world
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/jvm-jre-jdk
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/variables-and-literals
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/variables-primitive-data-types
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/operators
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/basic-input-output
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/expressions-statements-blocks
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/docs/comments
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
+ 0.64
+
+
+ https://javaistic.vercel.app/docs/if-else-statement
+ 2021-12-07T14:51:17+00:00
0.64
https://javaistic.vercel.app/programs/print-an-integer
- 2021-12-01T05:52:12+00:00
+ 2021-12-07T14:51:17+00:00
0.64
From d857ad8b459d1446425cca22577d2b3a9b907666 Mon Sep 17 00:00:00 2001
From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com>
Date: Tue, 7 Dec 2021 15:13:02 +0000
Subject: [PATCH 43/99] Update webpack to version 5.65.0
---
package.json | 2 +-
yarn.lock | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
index 504bfea1..048a17d7 100644
--- a/package.json
+++ b/package.json
@@ -59,7 +59,7 @@
"tailwindcss": "^2.2.19",
"tinytime": "^0.2.6",
"unist-util-visit": "^2.0.3",
- "webpack": "^5.64.4"
+ "webpack": "^5.65.0"
},
"devDependencies": {
"@babel/core": "^7.16.0",
diff --git a/yarn.lock b/yarn.lock
index b77fc45f..8f559c7f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6674,7 +6674,7 @@ vm-browserify@1.1.2:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
-watchpack@2.3.0, watchpack@^2.3.0:
+watchpack@2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.0.tgz#a41bca3da6afaff31e92a433f4c856a0c25ea0c4"
integrity sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw==
@@ -6682,6 +6682,14 @@ watchpack@2.3.0, watchpack@^2.3.0:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
+watchpack@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25"
+ integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==
+ dependencies:
+ glob-to-regexp "^0.4.1"
+ graceful-fs "^4.1.2"
+
web-namespaces@^1.0.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.4.tgz#bc98a3de60dadd7faefc403d1076d529f5e030ec"
@@ -6712,10 +6720,10 @@ webpack-sources@^3.2.2:
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260"
integrity sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==
-webpack@^5.64.4:
- version "5.64.4"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.4.tgz#e1454b6a13009f57cc2c78e08416cd674622937b"
- integrity sha512-LWhqfKjCLoYJLKJY8wk2C3h77i8VyHowG3qYNZiIqD6D0ZS40439S/KVuc/PY48jp2yQmy0mhMknq8cys4jFMw==
+webpack@^5.65.0:
+ version "5.65.0"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.65.0.tgz#ed2891d9145ba1f0d318e4ea4f89c3fa18e6f9be"
+ integrity sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==
dependencies:
"@types/eslint-scope" "^3.7.0"
"@types/estree" "^0.0.50"
@@ -6739,7 +6747,7 @@ webpack@^5.64.4:
schema-utils "^3.1.0"
tapable "^2.1.1"
terser-webpack-plugin "^5.1.3"
- watchpack "^2.3.0"
+ watchpack "^2.3.1"
webpack-sources "^3.2.2"
whatwg-url@^7.0.0:
From 12902be5bc403c3df60043cb3eccb7d6136af971 Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 04:36:30 +0530
Subject: [PATCH 44/99] Update DocumentationLayout.js
---
src/layouts/DocumentationLayout.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/layouts/DocumentationLayout.js b/src/layouts/DocumentationLayout.js
index 1928aed7..ae3f8e4c 100644
--- a/src/layouts/DocumentationLayout.js
+++ b/src/layouts/DocumentationLayout.js
@@ -14,6 +14,7 @@ export function DocumentationLayout(props) {
{props.layoutProps.meta.metaTitle || props.layoutProps.meta.title}
+
Date: Thu, 9 Dec 2021 04:36:34 +0530
Subject: [PATCH 45/99] Update ProgramsLayout.js
---
src/layouts/ProgramsLayout.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/layouts/ProgramsLayout.js b/src/layouts/ProgramsLayout.js
index 14ed6c6b..c3486733 100644
--- a/src/layouts/ProgramsLayout.js
+++ b/src/layouts/ProgramsLayout.js
@@ -14,6 +14,7 @@ export function ProgramsLayout(props) {
{props.layoutProps.meta.metaTitle || props.layoutProps.meta.title}
+
Date: Thu, 9 Dec 2021 06:56:20 +0530
Subject: [PATCH 46/99] Update package.json
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index 048a17d7..d93dfafa 100644
--- a/package.json
+++ b/package.json
@@ -46,6 +46,7 @@
"intersection-observer": "^0.12.0",
"minimatch": "^3.0.4",
"next": "^12.0.7",
+ "next-themes": "^0.0.15",
"postcss": "^8.4.4",
"postcss-focus-visible": "^5.0.0",
"postcss-import": "^14.0.2",
From b1d3b4f534cef8ed0a115d44653e346ece5ec2d0 Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 06:56:34 +0530
Subject: [PATCH 47/99] Update yarn.lock
---
yarn.lock | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/yarn.lock b/yarn.lock
index 8f559c7f..f6c31174 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4697,6 +4697,11 @@ neo-async@^2.6.2:
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
+next-themes@^0.0.15:
+ version "0.0.15"
+ resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.0.15.tgz#ab0cee69cd763b77d41211f631e108beab39bf7d"
+ integrity sha512-LTmtqYi03c4gMTJmWwVK9XkHL7h0/+XrtR970Ujvtu3s0kZNeJN24aJsi4rkZOI8i19+qq6f8j+8Duwy5jqcrQ==
+
next@^12.0.7:
version "12.0.7"
resolved "https://registry.yarnpkg.com/next/-/next-12.0.7.tgz#33ebf229b81b06e583ab5ae7613cffe1ca2103fc"
From 0e0cc1826c55a35fd597f161618fc90ba2ced1ae Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 06:57:52 +0530
Subject: [PATCH 48/99] Update _app.js
Add ThemeProvider
---
src/pages/_app.js | 65 +++++++++++++++++++++++++----------------------
1 file changed, 34 insertions(+), 31 deletions(-)
diff --git a/src/pages/_app.js b/src/pages/_app.js
index 9035e81a..505065a2 100644
--- a/src/pages/_app.js
+++ b/src/pages/_app.js
@@ -5,6 +5,7 @@ import ProgressBar from '@badrap/bar-of-progress'
import { ResizeObserver } from '@juggle/resize-observer'
import 'focus-visible'
import 'intersection-observer'
+import { ThemeProvider } from 'next-themes'
import Head from 'next/head'
import Router from 'next/router'
import { Fragment, useEffect, useState } from 'react'
@@ -50,7 +51,7 @@ export default function App({ Component, pageProps, router }) {
return () => {
Router.events.off('routeChangeComplete', handleRouteChange)
}
- }, [navIsOpen],[router.events])
+ }, [navIsOpen], [router.events])
const Layout = Component.layoutProps?.Layout || Fragment
const layoutProps = Component.layoutProps?.Layout
@@ -65,36 +66,38 @@ export default function App({ Component, pageProps, router }) {
return (
<>
-
{meta.metaTitle || meta.title}
-
-
-
-
-
-
-
-
-
-
-
- {router.pathname !== '/' && (
-
setNavIsOpen(isOpen)} />
- )}
-
-
-
+
+ {meta.metaTitle || meta.title}
+
+
+
+
+
+
+
+
+
+
+
+ {router.pathname !== '/' && (
+ setNavIsOpen(isOpen)} />
+ )}
+
+
+
+
>
)
}
From b973ac6012688ce89f031dc61b07af6cbdc76bed Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 07:47:52 +0530
Subject: [PATCH 49/99] Create ThemeChanger.js
---
src/components/ThemeChanger.js | 45 ++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 src/components/ThemeChanger.js
diff --git a/src/components/ThemeChanger.js b/src/components/ThemeChanger.js
new file mode 100644
index 00000000..0777488d
--- /dev/null
+++ b/src/components/ThemeChanger.js
@@ -0,0 +1,45 @@
+// ./components/ThemeChanger.js
+import { useEffect, useState } from 'react';
+import { useTheme } from 'next-themes';
+import { MoonIcon, SunIcon } from '@heroicons/react/outline';
+
+
+export default function ThemeChanger() {
+ const { systemTheme, theme, setTheme } = useTheme();
+ const [mounted, setMounted] = useState(false);
+
+ useEffect(() => {
+ setMounted(true);
+ }, []);
+
+ const renderThemeChanger = () => {
+
+ if (!mounted) return null;
+
+ const currentTheme = theme === 'system' ? systemTheme : theme;
+ if (currentTheme === 'dark') {
+ return ( setTheme('light')}
+ />
+ );
+ }
+ else {
+ return ( setTheme('dark')}
+ />
+ );
+ }
+ }
+
+ return (
+
+ {renderThemeChanger()}
+
+ );
+}
\ No newline at end of file
From 14270ec88cde3d5ab3a588d28d3d96720c65a0ec Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 07:49:52 +0530
Subject: [PATCH 50/99] Update Logo.js
---
src/components/Logo.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Logo.js b/src/components/Logo.js
index c076a33d..86a7d4fa 100644
--- a/src/components/Logo.js
+++ b/src/components/Logo.js
@@ -11,7 +11,7 @@ export function Logo(props) {
fillRule="evenodd"
clipRule="evenodd"
d="M74.972 20.192h5.908v-5.473h-5.907v5.473zM72.67 52.944c4.811 0 8.21-3.403 8.21-8.192V23.116h-5.907v21.191c0 2.104-1.13 3.199-3.228 3.199h-1.91v5.438h2.835zm31.643-29.828l-.608 2.07a10.77 10.77 0 00-7.192-2.677c-6.55 0-11.438 4.952-11.438 11.57 0 6.611 4.88 11.605 11.438 11.605 2.783 0 5.205-.975 7.072-2.642l.522 1.992h4.606V23.116h-4.4zm-7.32 16.967a5.83 5.83 0 01-4.263-1.726 5.81 5.81 0 01-1.68-4.277 5.791 5.791 0 011.67-4.29 5.808 5.808 0 014.273-1.722 5.81 5.81 0 015.551 3.695c.287.737.42 1.526.39 2.317a5.794 5.794 0 01-3.629 5.584 5.81 5.81 0 01-2.312.419zm31.746-16.966l-5.257 14.691-5.334-14.692h-6.31l8.896 21.918h5.453l8.647-21.918h-6.104.009zm26.283 0l-.608 2.069a10.766 10.766 0 00-7.191-2.677c-6.55 0-11.438 4.952-11.438 11.57 0 6.611 4.888 11.605 11.438 11.605 2.783 0 5.214-.975 7.071-2.642l.523 1.992h4.606V23.116h-4.401zm-7.32 16.966a5.827 5.827 0 01-5.543-3.692 5.815 5.815 0 01-.398-2.311 5.785 5.785 0 011.669-4.29 5.809 5.809 0 014.272-1.722 5.812 5.812 0 014.272 1.723 5.79 5.79 0 011.67 4.289 5.792 5.792 0 01-1.673 4.283 5.804 5.804 0 01-4.269 1.72zm17.44-19.891h5.856v-5.473h-5.856v5.473zm0 24.842h5.899V23.116h-5.908v21.927l.009-.009zm19.281.65c5.539 0 9.169-2.924 9.169-7.388 0-5.354-4.563-6.09-8.117-6.739-2.268-.402-4.126-.77-4.126-2.223 0-1.266 1.096-2.078 2.911-2.078 2.054 0 3.27.855 3.313 2.6h5.617c-.043-4.388-3.511-7.347-8.767-7.347-5.257 0-8.767 2.882-8.767 7.021 0 5.157 4.443 6.089 7.919 6.696 2.303.368 4.195.813 4.195 2.31 0 1.47-1.49 2.24-3.108 2.24-2.097 0-3.595-.975-3.638-2.925h-5.737c0 4.67 3.682 7.833 9.136 7.833zm23.98-5.926c-2.183 0-3.39-1.214-3.39-3.335v-8.518h5.942v-4.789h-6.028v-5.678h-1.13l-8.604 9.168v1.3h3.921v9.338c0 4.831 2.945 7.79 7.757 7.79h4.195v-5.276h-2.663zm6.695-19.566h5.865v-5.473h-5.865v5.473zm0 24.842h5.908V23.116h-5.908v21.927-.009zm21.712.65c5.693 0 10.18-3.737 11.19-9.253h-5.942c-1.01 2.352-2.868 3.652-5.248 3.652-3.159 0-5.616-2.634-5.616-6.003 0-3.421 2.423-6.012 5.616-6.012a5.604 5.604 0 015.248 3.455h5.865c-1.053-5.405-5.42-9.014-11.079-9.014-6.626 0-11.643 4.952-11.643 11.528 0 6.576 5.017 11.647 11.609 11.647zM30.452 42.6c4.924 0 8.917-3.98 8.917-8.889 0-4.909-3.992-8.888-8.917-8.888s-8.917 3.98-8.917 8.888c0 4.91 3.992 8.89 8.917 8.89z"
- fill="#000"
+ fill="currentColor"
/>
)
From 2fd1950d9b96c076b15189b87c1a1bd5c05279b6 Mon Sep 17 00:00:00 2001
From: Arghya Ghosh <71373838+uiuxarghya@users.noreply.github.com>
Date: Thu, 9 Dec 2021 07:52:32 +0530
Subject: [PATCH 51/99] Update index.js
Add darkmode support
---
src/pages/index.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/pages/index.js b/src/pages/index.js
index 069c4d94..3b5300ef 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -10,6 +10,7 @@ import { Testimonials } from '@/components/Testimonials'
import Head from 'next/head'
import NextLink from 'next/link'
import Router from 'next/router'
+import ThemeChanger from '@/components/ThemeChanger'
export default function Home() {
return (
@@ -43,11 +44,11 @@ export default function Home() {
Router.push('/brand')
}}
>
-
+