A comprehensive repository for learning Java OOP concepts with notes, examples, and exercises.
The repo is organized into All Topics (concept-by-concept examples and notes) and Exercise (practice projects).
| Topic | Description |
|---|---|
| Constructor | Object construction and initialization |
| Encapsulation | Bundling data and methods, access control |
| Access Specifier | Public, private, and other visibility modifiers |
| Inheritance | Single, multilevel, and hierarchical inheritance |
| Polymorphism | Method overloading and overriding |
| Abstraction | Abstract classes and hiding implementation |
| Interface | Contracts and multiple inheritance of type |
| Static Keyword | Class-level members and static methods |
| Inner Class | Nested and inner classes |
| Relationships | Association (one-to-one, one-to-many, many-to-many) |
| Exercise | Description |
|---|---|
| BankAccount | Practice OOP with a bank account scenario |
| Employee | Practice OOP with an employee scenario |
- Classes & Objects — Defining types and creating instances
- Inheritance — Reusing and extending behavior through parent-child relationships
- Polymorphism — Same interface, different behavior (overloading, overriding)
- Encapsulation — Hiding internal state and exposing controlled access
- Abstraction & Interfaces — Focusing on what objects do, not how they do it
- Fork this repository to your own GitHub account.
- Create a branch for your changes (e.g.
git checkout -b feature/add-new-example). - Make your changes — add notes, examples, or exercises following the contributing guidelines.
- Submit a Pull Request (PR) from your branch to this repo’s
mainbranch, with a clear description of what you changed.
We welcome contributions from everyone. See CONTRIBUTING.md for detailed guidelines.
Contributions that would be especially helpful:
- More examples — Extra code samples for existing topics or new subtopics
- New exercises — Small projects or problems that reinforce OOP concepts
- Diagrams — UML or simple diagrams (e.g. class diagrams, relationship sketches)
- Notes and docs — Short explanations, summaries, or cheat sheets in topic folders
- Fixes and polish — Typos, clearer naming, or better structure in existing code
If you’re unsure where to start, open an issue or pick something from the list above.
This project is licensed under the MIT License — see the LICENSE file for details.