Hands-on Java and DSA practice through small, single-topic programs.
- Syntax and operators
- Control flow (if/else, loops)
- Methods and parameter passing
- OOP essentials (classes, objects, inheritance, interfaces, abstract classes)
- Collections basics (arrays, ArrayList, Vector, Stack)
- Exception handling and basic I/O
- Recursion and pattern-printing exercises
- Java (JDK)
- Any IDE or text editor (e.g. IntelliJ IDEA, Eclipse, VS Code)
- Command line / Terminal
-
Clone the repository:
git clone https://github.com/debug-node/Java-from-scratch.git
-
Navigate into the project folder:
cd Java-from-scratch -
Compile and run Java files. For example:
javac Main.java java Main
-
To run any default-package file (swap path/class):
cd folder/with/file javac File.java java FileOr from repo root into a shared output folder:
javac -d out folder/with/file/File.java java -cp out File
Java-from-scratch/
├─ arrays/
│ ├─ array/
│ └─ arraylist/
├─ basic/
│ ├─ Operator/
│ ├─ condition/
│ ├─ loops/
│ ├─ function/
│ └─ simple/
├─ patterns/
├─ recursion/
├─ string/
├─ exception/
├─ OOPs/
│ ├─ Abstractclass/
│ ├─ CaloriesCalculator/
│ ├─ grades/
│ ├─ Inheritance/
│ └─ interfaceclass/
├─ Assignment/
├─ mypack/
└─ (add topics as needed: graphs/, streams/, concurrency/, jdbc/, collections-advanced/, algorithms/, ds/, tests/, scripts/)
Tip: View the live tree anytime (Windows):
tree /A /F-
Try writing small Java programs using concepts learned
-
Feel free to add your own examples or exercises
-
If you find bugs or improvements, submit pull requests
-
Optional: add helper scripts in scripts/ (e.g., compile/run by filename) to keep topic folders clean
- JDK 17+
- PRs welcome
- debug-node