diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..323e386e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,65 @@ +# Top-level EditorConfig +root = true + +# ---------------------------------------------------------------------- +# Defaults for all files +# ---------------------------------------------------------------------- +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +# Keep Markdown trailing spaces (they may mean line breaks) +[*.md] +trim_trailing_whitespace = false + +# Java / Kotlin / Gradle (4 spaces) +[*.{java,kt,gradle}] +indent_style = space +indent_size = 4 + +# Python (4 spaces) +[*.py] +indent_style = space +indent_size = 4 + +# JavaScript / TypeScript / JSX / TSX (2 spaces) +[*.{js,jsx,ts,tsx}] +indent_style = space +indent_size = 2 + +# JSON (2 spaces) +[*.json] +indent_style = space +indent_size = 2 + +# YAML (2 spaces) +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + +# XML (2 spaces) +[*.xml] +indent_style = space +indent_size = 2 + +# Shell scripts (2 spaces) +[*.{sh,bash}] +indent_style = space +indent_size = 2 + +# Windows scripts +[*.{cmd,bat,ps1}] +indent_style = space +indent_size = 2 + +# Properties files (2 spaces; avoid tabs) +[*.properties] +indent_style = space +indent_size = 2 + +# Makefiles must use tabs +[Makefile] +indent_style = tab +tab_width = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..0cce6c04 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,136 @@ +# ------------------------------------------------------------------------------ +# Core: normalize text files and keep LF in repo +# ------------------------------------------------------------------------------ +* text=auto eol=lf + +# ------------------------------------------------------------------------------ +# Source code (force LF) +# ------------------------------------------------------------------------------ +*.java text eol=lf +*.kt text eol=lf +*.py text eol=lf +*.js text eol=lf +*.jsx text eol=lf +*.ts text eol=lf +*.tsx text eol=lf +*.html text eol=lf +*.css text eol=lf +*.scss text eol=lf +*.md text eol=lf +*.txt text eol=lf +*.xml text eol=lf +*.json text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.sh text eol=lf +*.bash text eol=lf +*.gradle text eol=lf +*.properties text eol=lf +*.sql text eol=lf +*.c text eol=lf +*.cpp text eol=lf +*.h text eol=lf + +# ------------------------------------------------------------------------------ +# Binary files (never touch line endings / no diffs) +# ------------------------------------------------------------------------------ +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.svg binary +*.webp binary +*.pdf binary +*.jar binary +*.war binary +*.class binary +*.dll binary +*.exe binary +*.so binary +*.dylib binary +*.db binary +*.sqlite binary +*.zip binary +*.tar binary +*.tar.gz binary +*.tgz binary +*.7z binary +*.gz binary +*.xz binary +*.bz2 binary + +# ------------------------------------------------------------------------------ +# Diff & merge hygiene +# ------------------------------------------------------------------------------ +# Treat as text (better diffs) +*.md text +*.json text +*.xml text +*.yml text +*.yaml text +*.sql text + +# Lockfiles rarely need diffs +package-lock.json -diff +yarn.lock -diff +pnpm-lock.yaml -diff +*.lock -diff + +# Force binary merges +*.jar merge=binary +*.class merge=binary +*.dll merge=binary +*.exe merge=binary +*.so merge=binary +*.dylib merge=binary +*.db merge=binary +*.sqlite merge=binary +*.pdf merge=binary +*.png merge=binary +*.jpg merge=binary +*.jpeg merge=binary +*.gif merge=binary +*.ico merge=binary +*.svg merge=binary +*.webp merge=binary +*.zip merge=binary +*.tar merge=binary +*.tar.gz merge=binary +*.tgz merge=binary +*.7z merge=binary +*.gz merge=binary +*.xz merge=binary +*.bz2 merge=binary + +# Lock files: prefer ours +*.lock merge=ours + +# ------------------------------------------------------------------------------ +# GitHub Linguist overrides (make languages visible in stats) +# ------------------------------------------------------------------------------ +*.yml linguist-detectable=true +*.yaml linguist-detectable=true +*.xml linguist-detectable=true +*.json linguist-detectable=true +*.md linguist-detectable=true +*.sql linguist-detectable=true +*.md linguist-detectable=true linguist-language=Markdown +*.txt linguist-detectable=true + +# Force correct language classification +*.xml linguist-language=XML +*.json linguist-language=JSON +*.yml linguist-language=YAML +*.yaml linguist-language=YAML +*.sql linguist-language=SQL +*.md linguist-detectable=true linguist-language=Markdown +*.txt linguist-detectable=true + +# ------------------------------------------------------------------------------ +# Export settings (exclude from `git archive`) +# ------------------------------------------------------------------------------ +.gitattributes export-ignore +.gitignore export-ignore +.github/ export-ignore +tools/ export-ignore diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..d858e64d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# Require Someshdiwan to approve any changes to workflow files +/.github/workflows/ @Someshdiwan +/.github/workflows/** @Someshdiwan diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml index 7581eaf7..5041c046 100644 --- a/.github/workflows/jekyll-gh-pages.yml +++ b/.github/workflows/jekyll-gh-pages.yml @@ -1,106 +1,97 @@ -name: "Deploy Jekyll with GitHub Pages (robust)" +# .github/workflows/jekyll-pages.yml +name: Deploy Jekyll with GitHub Pages (robust) on: push: - branches: - - main - - master + branches: [ main, master ] workflow_dispatch: {} schedule: - # Run daily at 3:00 AM IST (21:30 UTC previous day) - - cron: '30 21 * * *' + # Daily at 3:00 AM IST (21:30 UTC previous day) + - cron: "30 21 * * *" +# Least privilege for Pages permissions: contents: read pages: write id-token: write +# Prevent overlapping deploys per ref concurrency: - group: "pages-${{ github.ref }}" + group: pages-${{ github.ref }} cancel-in-progress: false jobs: build: + # 🚫 Never run from forks / external PRs + if: > + github.repository == 'Someshdiwan/JavaEvolution-Learning-Growing-Mastering' && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) name: Build site (Jekyll) runs-on: ubuntu-latest timeout-minutes: 30 + steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - - name: Setup Pages (configure Pages environment) + - name: Configure Pages uses: actions/configure-pages@v5 - name: Detect Gemfile location - id: detect_gemfile + id: detect + shell: bash run: | if [ -f "site/Gemfile" ]; then - echo "gem_dir=site" >> $GITHUB_OUTPUT + echo "gem_dir=site" >> "$GITHUB_OUTPUT" echo "Found Gemfile in site/" elif [ -f "Gemfile" ]; then - echo "gem_dir=." >> $GITHUB_OUTPUT + echo "gem_dir=." >> "$GITHUB_OUTPUT" echo "Found Gemfile in repo root" else - echo "gem_dir=NONE" >> $GITHUB_OUTPUT - echo "No Gemfile found in site/ or repo root β€” will use Jekyll builder action fallback." + echo "gem_dir=NONE" >> "$GITHUB_OUTPUT" + echo "No Gemfile found; will use jekyll-build-pages fallback." fi - # If Gemfile exists, set up Ruby + Bundler and build with bundle exec - - name: Set up Ruby (only when Gemfile present) - if: ${{ steps.detect_gemfile.outputs.gem_dir != 'NONE' }} + # Fast path: use the repo's Gemfile (caches automatically) + - name: Setup Ruby (bundler cache) + if: ${{ steps.detect.outputs.gem_dir != 'NONE' }} uses: ruby/setup-ruby@v1 with: ruby-version: '3.2' - bundler-cache: false - - - name: Cache bundler gems (only when Gemfile present) - if: ${{ steps.detect_gemfile.outputs.gem_dir != 'NONE' }} - uses: actions/cache@v4 - id: cache-bundler - with: - path: vendor/bundle - key: ${{ runner.os }}-gems-${{ steps.detect_gemfile.outputs.gem_dir }}-${{ hashFiles(format('{0}/Gemfile.lock', steps.detect_gemfile.outputs.gem_dir)) }} - restore-keys: | - ${{ runner.os }}-gems-${{ steps.detect_gemfile.outputs.gem_dir }}- - - - name: Install Ruby gems with Bundler (only when Gemfile present) - if: ${{ steps.detect_gemfile.outputs.gem_dir != 'NONE' }} - run: | - echo "Using Gemfile from: ${{ steps.detect_gemfile.outputs.gem_dir }}" - cd ${{ steps.detect_gemfile.outputs.gem_dir }} - bundle config set --local path 'vendor/bundle' - # retry logic to cope with transient network errors - bundle install --jobs 4 --retry 3 - shell: bash + bundler-cache: true + # cache & install are scoped to where the Gemfile lives + working-directory: ${{ steps.detect.outputs.gem_dir }} - - name: Build site with Bundler (only when Gemfile present) - if: ${{ steps.detect_gemfile.outputs.gem_dir != 'NONE' }} - run: | - cd ${{ steps.detect_gemfile.outputs.gem_dir }} - echo "Building Jekyll with bundle exec..." - bundle exec jekyll build --source . --destination ../_site + - name: Build with bundle exec + if: ${{ steps.detect.outputs.gem_dir != 'NONE' }} + working-directory: ${{ steps.detect.outputs.gem_dir }} env: JEKYLL_ENV: production shell: bash + run: | + echo "Building Jekyll from $(pwd)…" + bundle exec jekyll build --source . --destination "${GITHUB_WORKSPACE}/_site" - # Fallback: if there's no Gemfile, use the jekyll-build-pages action (best-effort) + # Fallback: no Gemfile; use the official builder (looks in ./site by default) - name: Build with actions/jekyll-build-pages (fallback) - if: ${{ steps.detect_gemfile.outputs.gem_dir == 'NONE' }} + if: ${{ steps.detect.outputs.gem_dir == 'NONE' }} uses: actions/jekyll-build-pages@v1 with: source: ./site destination: ./_site - name: Validate _site exists + shell: bash run: | if [ ! -d "_site" ]; then - echo "_site wasn't generated β€” failing the job." + echo "::error::_site was not generated." ls -la exit 1 fi + echo "βœ… _site generated." - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 @@ -109,17 +100,21 @@ jobs: name: java-evolution-pages deploy: + # 🚫 Never run from forks / external PRs + if: > + github.repository == 'Someshdiwan/JavaEvolution-Learning-Growing-Mastering' && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) name: Deploy to GitHub Pages needs: build runs-on: ubuntu-latest environment: name: github-pages steps: - - name: Deploy to GitHub Pages + - name: Deploy id: deployment uses: actions/deploy-pages@v4 with: artifact_name: java-evolution-pages - - name: Output deploy URL + - name: Show URL run: echo "Deployed to ${{ steps.deployment.outputs.page_url }}" diff --git a/.github/workflows/telegram-commits.yml b/.github/workflows/telegram-commits.yml new file mode 100644 index 00000000..44ef1956 --- /dev/null +++ b/.github/workflows/telegram-commits.yml @@ -0,0 +1,90 @@ +name: Telegram – Last 10 Commits (Clean Text) + +on: + push: + branches: ["**"] + +permissions: + contents: read + +jobs: + send: + if: github.repository == 'Someshdiwan/JavaEvolution-Learning-Growing-Mastering' + runs-on: ubuntu-latest + environment: SANDBOX + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 50 # enough for recent history + + - name: Build message (plain text, IST timestamps) + id: msg + shell: bash + env: + REPO: ${{ github.repository }} + ACTOR: ${{ github.actor }} + REF_NAME: ${{ github.ref_name }} + REPO_URL: ${{ github.server_url }}/${{ github.repository }} + SITE_URL: https://someshdiwan.github.io/JavaEvolution-Learning-Growing-Mastering/ + run: | + set -euo pipefail + + # Pull last 10 commits with subject | short hash | IST datetime + # Use Git's format-local and force runner TZ to Asia/Kolkata + mapfile -t LINES < <( + TZ=Asia/Kolkata \ + git log -n 10 \ + --date=format-local:'%d %b %Y, %H:%M IST' \ + --pretty=format:'%s%x1f%h%x1f%ad' || true + ) + + if [[ ${#LINES[@]} -eq 0 ]]; then + COMMITS="- (no commit messages found)" + else + COMMITS="" + for row in "${LINES[@]}"; do + IFS=$'\x1f' read -r subj short when <<<"$row" + # bullet + blank line after each item + COMMITS+="- ${subj} (${short}) β€” ${when}"$'\n\n' + done + # trim final blank line + COMMITS="${COMMITS%$'\n\n'}" + fi + + { + printf 'text<> "$GITHUB_OUTPUT" + + - name: Send to Telegram (plain text) + shell: bash + env: + TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} + TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }} + TEXT: ${{ steps.msg.outputs.text }} + run: | + set -euo pipefail + [[ -n "${TG_BOT_TOKEN:-}" && -n "${TG_CHAT_ID:-}" ]] || { echo "Missing TG secrets"; exit 1; } + + # Plain text: keeps your newlines and spacing as-is + curl -sS -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \ + -H 'Content-Type: application/json' \ + -d "$(jq -n \ + --arg chat_id "$TG_CHAT_ID" \ + --arg text "$TEXT" \ + '{chat_id:$chat_id, text:$text, disable_web_page_preview:true}')" \ + | jq -e '.ok == true' >/dev/null + + echo "βœ… Posted last 10 commits to Telegram." diff --git a/.github/workflows/telegram-notify.yml b/.github/workflows/telegram-notify.yml new file mode 100644 index 00000000..3c7c96a8 --- /dev/null +++ b/.github/workflows/telegram-notify.yml @@ -0,0 +1,176 @@ +name: Telegram – Repo Notifications (Clean Text) + +on: + push: + branches: ["**"] + tags: ["*"] + pull_request: + types: [opened, reopened, synchronize, closed] + release: + types: [published] + workflow_dispatch: + inputs: + title: + description: "Manual title (default: πŸ“£ Manual)" + required: false + default: "πŸ“£ Manual" + text: + description: "Message to send" + required: true + chat_id: + description: "Override TG_CHAT_ID (e.g., @Channel or numeric ID)" + required: false + +permissions: + contents: read + +concurrency: + group: telegram-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: false + +jobs: + notify: + if: > + github.repository == 'Someshdiwan/JavaEvolution-Learning-Growing-Mastering' && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) + runs-on: ubuntu-latest + environment: SANDBOX + permissions: + contents: read + steps: + - name: Checkout repository (for commit history) + if: github.event_name == 'push' # Only needed for push events + uses: actions/checkout@v4 + with: + fetch-depth: 100 + + - name: Build notification message + id: build-message + shell: bash + env: + REPO: ${{ github.repository }} + ACTOR: ${{ github.actor }} + EVENT: ${{ github.event_name }} + REF_NAME: ${{ github.ref_name }} + REPO_URL: ${{ github.server_url }}/${{ github.repository }} + GIT_BEFORE: ${{ github.event.before }} + GIT_SHA: ${{ github.sha }} + PR_NUM: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_ACTION: ${{ github.event.action }} + PR_MERGED: ${{ github.event.pull_request.merged }} + PR_HEAD: ${{ github.event.pull_request.head.ref }} + PR_BASE: ${{ github.event.pull_request.base.ref }} + REL_TAG: ${{ github.event.release.tag_name }} + REL_NAME: ${{ github.event.release.name }} + REL_URL: ${{ github.event.release.html_url }} + WD_TITLE: ${{ github.event.inputs.title }} + WD_TEXT: ${{ github.event.inputs.text }} + run: | + set -euo pipefail + + # Helper functions for headers + header_push() { + printf 'πŸ“£ Repository Update\n🌐 Repo: %s\n🌳 Branch: %s\nπŸ‘€ By: %s\n\n' \ + "$REPO" "$REF_NAME" "https://github.com/$ACTOR" + } + + header_pr() { + printf 'πŸ“£ Pull Request Update\n🌐 Repo: %s\nπŸ‘€ By: %s\n\n' \ + "$REPO" "https://github.com/$ACTOR" + } + + header_release() { + printf 'πŸ“£ New Release\n🌐 Repo: %s\nπŸ‘€ By: %s\n\n' \ + "$REPO" "https://github.com/$ACTOR" + } + + header_manual() { + printf '%s\nπŸ‘€ By: %s\n\n' "${WD_TITLE:-πŸ“£ Manual}" "https://github.com/$ACTOR" + } + + # Build message based on event type + message="" + case "$EVENT" in + workflow_dispatch) + message="$(header_manual)${WD_TEXT}" + ;; + push) + # Fetch last 10 commits (subject, short hash, author) + before="${GIT_BEFORE:-}" + after="$GIT_SHA" + if [[ -z "$before" || "$before" =~ ^0+$ ]]; then + mapfile -t commits < <(git log -n 10 --pretty=format:'%s%x1f%h%x1f%an' "$after" 2>/dev/null || true) + else + mapfile -t commits < <(git log --pretty=format:'%s%x1f%h%x1f%an' "$before..$after" 2>/dev/null | head -n 10 || true) + fi + + if [[ ${#commits[@]} -eq 0 ]]; then + commits_text="- No commit messages found" + else + commits_text="" + for row in "${commits[@]}"; do + IFS=$'\x1f' read -r subject hash author <<<"$row" + commits_text+="- ${subject} (${hash}) by ${author}\n" + done + commits_text="${commits_text%$'\n'}" + fi + message="$(header_push)Last 10 commits:\n${commits_text}\n\nπŸ”— Repo: ${REPO_URL}" + ;; + pull_request) + # Determine PR status + case "$PR_ACTION" in + closed) [[ "$PR_MERGED" == "true" ]] && status="πŸ”€ Merged PR #${PR_NUM}" || status="❌ Closed PR #${PR_NUM}";; + opened) status="πŸ†• Opened PR #${PR_NUM}";; + *) status="✏️ Updated PR #${PR_NUM}";; + esac + message="$(header_pr)${status}\nπŸ“ Title: ${PR_TITLE}\nπŸ”„ From: ${PR_HEAD} β†’ ${PR_BASE}\nπŸ”— Link: ${PR_URL}\n\nπŸ”— Repo: ${REPO_URL}" + ;; + release) + name="${REL_NAME:-$REL_TAG}" + message="$(header_release)🏷️ Tag: ${REL_TAG}\nπŸ“œ Name: ${name}\nπŸ”— Link: ${REL_URL}\n\nπŸ”— Repo: ${REPO_URL}" + ;; + *) + message="πŸ“£ Event: ${EVENT}\n🌐 Repo: ${REPO}\nπŸ‘€ By: https://github.com/${ACTOR}\n🌳 Ref: ${REF_NAME}\n\nπŸ”— Repo: ${REPO_URL}" + ;; + esac + + # Truncate message to avoid Telegram's ~4096 char limit + if (( $(printf %s "$message" | wc -c) > 3900 )); then + message="$(printf %s "$message" | head -c 3900) … (truncated)" + fi + + # Escape and output message + message=$(printf '%s' "$message" | jq -R -s .) + echo "text=$message" >> "$GITHUB_OUTPUT" + + - name: Send message to Telegram + shell: bash + env: + TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} + TG_CHAT_ID_DEFAULT: ${{ secrets.TG_CHAT_ID }} + OVERRIDE_CHAT_ID: ${{ github.event.inputs.chat_id }} + TEXT: ${{ steps.build-message.outputs.text }} + run: | + set -euo pipefail + + # Validate secrets + chat_id="${OVERRIDE_CHAT_ID:-$TG_CHAT_ID_DEFAULT}" + if [[ -z "${TG_BOT_TOKEN}" || -z "${chat_id}" ]]; then + echo "Error: Missing TG_BOT_TOKEN or chat_id" >&2 + exit 1 + fi + + # Send message to Telegram API + response=$(curl -sS -X POST "https://api.telegram.org/bot${TG_BOT_TOKEN}/sendMessage" \ + -H 'Content-Type: application/json' \ + -d "{\"chat_id\": \"${chat_id}\", \"text\": ${TEXT}, \"disable_web_page_preview\": true}") + + # Check response + if ! echo "$response" | jq -e '.ok == true' >/dev/null; then + echo "Error: Failed to send message to Telegram" >&2 + echo "Response: $response" >&2 + exit 1 + fi + echo "βœ… Successfully sent message to Telegram" diff --git a/Java 8 Crash Course/Java 8 Streams/Declarative Programming/src/ Declarative Programming.txt b/Java 8 Crash Course/Java 8 Streams/Declarative Programming/src/Declarative Programming.txt similarity index 100% rename from Java 8 Crash Course/Java 8 Streams/Declarative Programming/src/ Declarative Programming.txt rename to Java 8 Crash Course/Java 8 Streams/Declarative Programming/src/Declarative Programming.txt diff --git a/Java 8 Crash Course/Java 8 Streams/Primitive Streams/src/Primitive Streams In Java .txt b/Java 8 Crash Course/Java 8 Streams/Primitive Streams/src/Primitive Streams In Java.txt similarity index 100% rename from Java 8 Crash Course/Java 8 Streams/Primitive Streams/src/Primitive Streams In Java .txt rename to Java 8 Crash Course/Java 8 Streams/Primitive Streams/src/Primitive Streams In Java.txt diff --git a/Java 8 Crash Course/Java Collectors API/src/Overview: Streams, Collections Framework, and Generics.txt b/Java 8 Crash Course/Java Collectors API/src/Overview Streams, Collections Framework, and Generics.txt similarity index 100% rename from Java 8 Crash Course/Java Collectors API/src/Overview: Streams, Collections Framework, and Generics.txt rename to Java 8 Crash Course/Java Collectors API/src/Overview Streams, Collections Framework, and Generics.txt diff --git a/README.md b/README.md index f7710f54..46b86542 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,64 @@

- - Typing SVG + + + Make JAVA Great Again!

+

+ + Great Code Starts with Java. Master It, Shape the Future. +

+ +
+

+ + + Contribute + + + + + + + +

+ +

+ + + + +

- Typing Motto + + + Join Telegram +

+

- - Contribute + + Telegram Updates Banner +

+ + +

- - Live Guide - diff --git a/Section 25 Collections Frameworks/List Interface/ArrayList/src/ArrayListDemo7.java b/Section 25 Collections Frameworks/List Interface/ArrayList/src/ArrayListDemo7.java new file mode 100644 index 00000000..22e3ce5f --- /dev/null +++ b/Section 25 Collections Frameworks/List Interface/ArrayList/src/ArrayListDemo7.java @@ -0,0 +1,26 @@ +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.util.ArrayList; + +public class ArrayListDemo7 { + public static void main(String[] args) { + // Get the Class object of ArrayList + Class classOB = ArrayList.class; + + // Get all constructors of ArrayList + Constructor [] declaredConstructors = classOB.getDeclaredConstructors(); + + // Get all methods of ArrayList + Method[] declaredMethods = classOB.getDeclaredMethods(); + + // Print all constructor names + for(Constructor constructor : declaredConstructors) { + System.out.println(constructor.getName()); + } + + // Print all method names + for(Method method : declaredMethods) { + System.out.println(method.getName()); + } + } +} diff --git "a/Section 25 Collections Frameworks/Map Interface/HashMap/src/Hash Map Working/How Data Is Stored Internally In HashMap/ HashCode \342\206\222 bucketIndex mapping in HashMap.txt" b/Section 25 Collections Frameworks/Map Interface/HashMap/src/Hash Map Working/How Data Is Stored Internally In HashMap/HashCode Bucket Index Mapping.txt similarity index 100% rename from "Section 25 Collections Frameworks/Map Interface/HashMap/src/Hash Map Working/How Data Is Stored Internally In HashMap/ HashCode \342\206\222 bucketIndex mapping in HashMap.txt" rename to Section 25 Collections Frameworks/Map Interface/HashMap/src/Hash Map Working/How Data Is Stored Internally In HashMap/HashCode Bucket Index Mapping.txt diff --git "a/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Differences Between TreeMap and HashMap \342\200\224 Detailed.txt" b/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Differences Between TreeMap and HashMap Detailed.txt similarity index 100% rename from "Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Differences Between TreeMap and HashMap \342\200\224 Detailed.txt" rename to Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Differences Between TreeMap and HashMap Detailed.txt diff --git a/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Plain BST vs Tree Map b/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Plain BST vs Tree Map.txt similarity index 100% rename from Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Plain BST vs Tree Map rename to Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Plain BST vs Tree Map.txt diff --git a/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Red-Black Balancing.txt b/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Red Black Balancing.txt similarity index 100% rename from Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Red-Black Balancing.txt rename to Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/Red Black Balancing.txt diff --git a/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/TreeMap Insertion + Red-Black Balancing.txt b/Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/TreeMap Insertion Red-Black Balancing.txt similarity index 100% rename from Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/TreeMap Insertion + Red-Black Balancing.txt rename to Section 25 Collections Frameworks/Map Interface/Sorted Map/TreeMap/src/VIP/TreeMap Insertion Red-Black Balancing.txt diff --git a/Section10Methods/LocalandGlobalVariables/src/Difference Between `this` and `super` in Java.txt b/Section10Methods/LocalandGlobalVariables/src/Difference Between this and super in Java.txt similarity index 100% rename from Section10Methods/LocalandGlobalVariables/src/Difference Between `this` and `super` in Java.txt rename to Section10Methods/LocalandGlobalVariables/src/Difference Between this and super in Java.txt diff --git a/Section11ObjectOrientedProgramming/src/Explain use of `this` keyword.txt b/Section11ObjectOrientedProgramming/src/Explain use of this keyword.txt similarity index 100% rename from Section11ObjectOrientedProgramming/src/Explain use of `this` keyword.txt rename to Section11ObjectOrientedProgramming/src/Explain use of this keyword.txt diff --git a/Section15InnerClasses/src/Difference Between `this` and `super` in Java.md b/Section15InnerClasses/src/Difference Between This and Super in Java.md similarity index 100% rename from Section15InnerClasses/src/Difference Between `this` and `super` in Java.md rename to Section15InnerClasses/src/Difference Between This and Super in Java.md diff --git a/Section15InnerClasses/src/Real-World Analogy for `this` vs `super`.md b/Section15InnerClasses/src/Real World Analogy For This vs Super.md similarity index 100% rename from Section15InnerClasses/src/Real-World Analogy for `this` vs `super`.md rename to Section15InnerClasses/src/Real World Analogy For This vs Super.md diff --git a/Section16StaticFinal/src/ThisVsSuper b/Section16StaticFinal/src/ThisVsSuper.txt similarity index 100% rename from Section16StaticFinal/src/ThisVsSuper rename to Section16StaticFinal/src/ThisVsSuper.txt diff --git a/Section19MultiThreading/DeadLock/src/DeadLocks b/Section19MultiThreading/DeadLock/src/DeadLocks.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/DeadLocks rename to Section19MultiThreading/DeadLock/src/DeadLocks.txt diff --git a/Section19MultiThreading/DeadLock/src/Deep Dive into Thread Safety Techniques b/Section19MultiThreading/DeadLock/src/Deep Dive into Thread Safety Techniques.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/Deep Dive into Thread Safety Techniques rename to Section19MultiThreading/DeadLock/src/Deep Dive into Thread Safety Techniques.txt diff --git a/Section19MultiThreading/DeadLock/src/Detailed Real-World Examples of Thread Safety b/Section19MultiThreading/DeadLock/src/Detailed Real-World Examples of Thread Safety.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/Detailed Real-World Examples of Thread Safety rename to Section19MultiThreading/DeadLock/src/Detailed Real-World Examples of Thread Safety.txt diff --git a/Section19MultiThreading/DeadLock/src/More Real-World Examples of Thread Safety with Deep Explanations b/Section19MultiThreading/DeadLock/src/More Real World Examples of Thread Safety with Deep Explanations.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/More Real-World Examples of Thread Safety with Deep Explanations rename to Section19MultiThreading/DeadLock/src/More Real World Examples of Thread Safety with Deep Explanations.txt diff --git a/Section19MultiThreading/DeadLock/src/Real-World Examples of Thread Safety b/Section19MultiThreading/DeadLock/src/Real World Examples of Thread Safety.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/Real-World Examples of Thread Safety rename to Section19MultiThreading/DeadLock/src/Real World Examples of Thread Safety.txt diff --git a/Section19MultiThreading/DeadLock/src/What is Thread Safety b/Section19MultiThreading/DeadLock/src/What is Thread Safety.txt similarity index 100% rename from Section19MultiThreading/DeadLock/src/What is Thread Safety rename to Section19MultiThreading/DeadLock/src/What is Thread Safety.txt diff --git a/Section19MultiThreading/Synchronization/src/Test/Disadvantages of `synchronized` in Java.txt b/Section19MultiThreading/Synchronization/src/Test/Disadvantages of Synchronized in Java.txt similarity index 100% rename from Section19MultiThreading/Synchronization/src/Test/Disadvantages of `synchronized` in Java.txt rename to Section19MultiThreading/Synchronization/src/Test/Disadvantages of Synchronized in Java.txt diff --git a/Section19MultiThreading/ThreadPooling/ExecutorsFramework/src/TXTFiles/Understanding `Executors.newCachedThreadPool().txt b/Section19MultiThreading/ThreadPooling/ExecutorsFramework/src/TXTFiles/Understanding Executors Cached Thread Pool.txt similarity index 100% rename from Section19MultiThreading/ThreadPooling/ExecutorsFramework/src/TXTFiles/Understanding `Executors.newCachedThreadPool().txt rename to Section19MultiThreading/ThreadPooling/ExecutorsFramework/src/TXTFiles/Understanding Executors Cached Thread Pool.txt diff --git a/Section19MultiThreading/ThreadPooling/src/Thread Pooling - Why Use It.txt b/Section19MultiThreading/ThreadPooling/src/Thread Pooling Why Use It.txt similarity index 100% rename from Section19MultiThreading/ThreadPooling/src/Thread Pooling - Why Use It.txt rename to Section19MultiThreading/ThreadPooling/src/Thread Pooling Why Use It.txt diff --git a/Tips And Tricks/How Java Works.png b/Tips And Tricks/How Java Works.png new file mode 100644 index 00000000..dd6b2489 Binary files /dev/null and b/Tips And Tricks/How Java Works.png differ diff --git a/site/assets/telegram-updates-text.svg b/site/assets/telegram-updates-text.svg new file mode 100644 index 00000000..bc053518 --- /dev/null +++ b/site/assets/telegram-updates-text.svg @@ -0,0 +1,55 @@ + + Telegram updates banner + Animated typing line inviting users to join a Telegram channel for real-time updates. + + + + + + + + + + + + + + + + + + + + + + + + + πŸ”” Stay connected β€” get + real-time updates + about this repo on our + Telegram channel + . + + + + diff --git a/site/content.md b/site/content.md index 1d322ff8..7ac7a5ee 100644 --- a/site/content.md +++ b/site/content.md @@ -878,7 +878,7 @@ It also illustrates the concept of singleton classes and demonstrates how this a #### 🧠 Related Topic Overview: - **Repo Content:** - Static.java, StaticBlock.java, StaticByED.java, Static.txt, static keyword.txt: Showcase use-cases for static variables, static blocks, and methods. - - FinalKeyWord.java, static and final.txt: Explains immutability using final and how static final is used for constants. + - FinalKeyWord.java, static, and final.txt: Explains immutability using final and how static final is used for constants. - BankAccountAutomaticStatic.java, BankAccountIMP.java`: Demonstrate shared/static counters and behaviors across instances. - SingletoneClass.java: Implements a Singleton pattern using a static instance for controlled object creation. - This.java, ThisKeyword.java, ThisVsSuper, SuperKeywrd.java: Explore how this and super help reference instance vs. parent class elements. @@ -1566,7 +1566,7 @@ You dive into **generic classes, interfaces, and wildcards** β€” foundational fo | Topic | Key Files | Concepts Learned | |--------------------------- |--------------------------------------------------------|-----------------------------------------------------------------| | Generic Classes | Box.java, Pair.java, BoxType.java | Custom containers with parameterized types | -| Generic Methods | GenericFunctionsExample.java, Generics.GenericDemo.java | Type-safe utility methods for operations like swap/filter | +| Generic Methods | GenericFunctionsExample.java, Generics.GenericDemo.java| Type-safe utility methods for operations like swap/filter | | Generic Interfaces | GenericInterfaces.java, StringContainer1.java | Reusable service/container interfaces with flexible types | | Bounded Type Parameters | Upper and Lower Bounds...txt, GenericClass2.GenericClassDemo2.java | Constraining generic types using extends and super | | Wildcards and Super Bounds | Java Generics Wildcards...txt, Wild Cards file | Handle flexible method arguments with and bounds |