Skip to content

Java programs covering OOP, inheritance, collections, exceptions, threads, and mini-projects.

Notifications You must be signed in to change notification settings

Akash073-hub/My_java

Repository files navigation

🌟 My_java — Complete Java Practice Repository

Welcome to My_java, Dil’s complete Java learning repository ❤️ It contains all Java concepts, from basics → advanced, organized cleanly into folders.

📌 What This Repo Includes

  • OOP (Encapsulation, Inheritance, Polymorphism, Abstraction)
  • Collections (List, Set, Map, TreeMap, Iterator)
  • ✅ Threads & Synchronization
  • ✅ Exception Handling + Custom Exceptions
  • ✅ File Handling
  • ✅ Projects (Bank System, Agriculture, Hotel)
  • ...and more!

📁 Folder Structure

Below is a full breakdown of each folder and what it contains.

📘 Arrays

  • 1D & 2D Arrays
  • Matrix Operations
  • Searching & Sorting
  • Array logic programs (reverse, rotate, frequency)

🔁 Loops

  • for, while, do-while
  • Nested loops
  • Pattern printing

⚙️ Conditional_problems

  • if–else
  • switch
  • Menu-driven programs

🏛 OOPs

  • Classes & Objects
  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism

🔐 Encapsulation

All programs based on private variables, getters, setters, and data-hiding.

🌳 Inheritance

Single, multilevel, hierarchical inheritance + super() chaining examples.

🌀 Polymorphism

Method overloading + method overriding programs.

🚨 Exception_handling

  • try-catch-finally
  • throw & throws
  • Multiple catch
  • Custom Exceptions

🧵 Thread_Synchronized

  • Creating threads
  • Runnable interface
  • Synchronized blocks & methods
  • Race condition handling

🧩 Methods

Programs demonstrating static vs non-static methods, return types, and parameters.

📝 Strings

  • String operations
  • StringBuilder & StringBuffer
  • Palindrome checks
  • Substring & splitting

🚀 Projects

🚜 Smart_Agriculture_Automation

  • Workers, owners, machines
  • Skill levels, automation logic
  • OOP + collections + file handling

🏦 Advanced_Bank_Account_Processor

  • Savings Accounts + Transactions
  • List & Map for storing records
  • TreeMap sorting
  • File writing (account_report.txt)
  • Synchronization

🍽 hotel

  • Billing system
  • Interfaces
  • Packages
  • Menu handling

💾 students.txt

Used for file handling read-write operations.

📦 out/

Contains auto-generated compiled .class files (ignored normally).

⚙️ GitHub Workflows

Inside .github/workflows/ you have a Gradle CI workflow. It performs:

  • ⚡ Automatic build
  • ⚡ Compile check
  • ⚡ Continuous Integration