This repository contains a complete collection of Object-Oriented Programming (OOP) concepts in Java. Each concept is explained with clear, beginner-friendly, and well-structured code examples.
The repo is organized into folders for easy navigation, making it useful for:
- 📚 Students learning Java OOP
- 🔄 Quick revision before exams or interviews
- 👩💻 Developers brushing up OOP fundamentals
Java-OOP-Learning/src/
├── _01_Basics/ # Classes, Objects, Constructors
├── _02_Static_Concepts/ # Static Variables, Methods, Blocks, vs Non-static, Singleton Class
├── _03_Encapsulation/ # Encapsulation, Access Modifiers, Getters & Setters, final variables, Immutability
├── _04_Abstraction_And_Interfaces/ # Abstract Class, Interface, Default & Static methods, Extended & Nested Interfaces, Diamond Problem
├── _05_Inheritance/ # Types, Constructor Chaining, super & final Keywords, Relationships
├── _06_Polymorphism/ # Compile-time (Overloading), Runtime (Overriding), Down-cating, Dynamic Object Creation
├── _07_Inner_Classes/ # Anonymous, Local, Member, Static Inner Classes
├── _08_Built_In_Classes/ # String, StringBuilder, Wrapper Classes, Object, Math, etc.
├── _09_Built_In_Interfaces/ # Comparable, Comparator, Cloneable, Runnable, Iterator, etc.
└── README.md
- Organize concepts into folders by pillars for clear navigation.
- Highlight Java-specific behavior for concepts like multiple inheritance, diamond problem, final/immutable classes, and dynamic method dispatch.
- Cover advanced topics like built-in classes, interfaces, generics, annotations, exception handling, and design patterns like Singleton.
- Provide a structured, step-by-step exploration of Java OOP concepts from basics to advanced.
- Serve as a personal reference and revision resource for learners.
- Offer beginner-friendly, clean, and well-commented code for easy understanding.
- Clone this repository:
git clone https://github.com/nabeerah27/Java-OOP-Learning.git
- Open the project in IntelliJ IDEA or any Java IDE.
- Navigate to the folder of the concept you want to run.
- Compile and run the
.javafiles.
Note: Each .java file contains its own main method for easy execution.
This code is available under the MIT License — check LICENSE for more info.
- 🛠️ Feel free to contribute with examples, improvements, or enhancements.
- 🌐 Spread the word and share this repo with anyone who might find it useful.