Skip to content

Latest commit

Β 

History

History
63 lines (47 loc) Β· 2.5 KB

File metadata and controls

63 lines (47 loc) Β· 2.5 KB

πŸš€ Java Mastery Repository

Welcome to the ultimate Java learning and practice repository! This collection has been reorganized and enhanced to provide a seamless learning experience, from core concepts to advanced Data Structures and Algorithms (DSA).

πŸ“‚ Project Structure

The project is divided into two main modules for clarity:

1. β˜• core-java/

Categorized collection of over 350+ Java snippets reorganized for efficient learning:

  • basics/: Constructors, OOPS (Inheritance, Polymorphism, Interfaces), Exception Handling, and IO.
  • dsa/: Data Structures & Algorithms (Arrays, Sorting, Searching, Linked Lists, Matrix, Recursion, etc.).
  • advanced/: Advanced features like Streams, Multithreading, Concurrency, Design Patterns, and Mini-projects.
  • practice/: General practice scripts, String challenges, and patterns.
  • collectionframework/: Dedicated module for the Java Collections Framework.

2. 🧩 DSA/

A structured Data Structures and Algorithms pathway based on the Apna College DSA course:

  • Arrays/, LinkedList/, BinaryTrees/, Backtracking/
  • Recursion/, BitManipulation/, Sorting/, Strings/
  • And many more industry-standard algorithms.

πŸ› οΈ Enhanced Runner Framework

Running single Java scripts is now easier than ever! No need to worry about packages or complex classpaths.

Using PowerShell (Windows Recommended)

We provide a simple wrapper script run.ps1 to find and execute any class by its name.

  1. Open PowerShell in the project root.

  2. Run any class by its name:

    .\run.ps1 BinarySearch

    This will automatically find, compile, and execute core-java/src/dsa/search/BinarySearch.java.

  3. List available categories:

    .\run.ps1

Manual Run

If you prefer standard Java commands (requires Java 21+):

# Compile and run from core-java root
javac -d core-java/bin -sourcepath core-java/src core-java/src/dsa/search/BinarySearch.java
java -cp core-java/bin dsa.search.BinarySearch

πŸŽ“ Learning Tips

  • Small Steps: Start with core-java/src/basics/ to master foundations.
  • Algorithms: Move to core-java/src/dsa/ or the DSA/ root folder for step-by-step challenges.
  • Practice: Look into core-java/src/practice/ for hundreds of solved problems.

βš™οΈ Requirements

  • JDK 21 or higher (Recommended for "Implicit Classes" and Instance Main Methods support).

Happy Coding! ✨