An open API service indexing awesome lists of open source software.

https://github.com/shivam-kumar-59/java-oops

Welcome to my Java OOPs Learning Repository! 🎓 This repository serves as a collection of all the Java programs I write while exploring and mastering the concepts of Object-Oriented Programming (OOP).
https://github.com/shivam-kumar-59/java-oops

java oop oop-principles oops-in-java software-development software-engineering

Last synced: 29 days ago
JSON representation

Welcome to my Java OOPs Learning Repository! 🎓 This repository serves as a collection of all the Java programs I write while exploring and mastering the concepts of Object-Oriented Programming (OOP).

Awesome Lists containing this project

README

          

# **Java OOPs Learning Repository** 📚✨

Welcome to my **Java OOPs Learning Repository**! 🎓 This repository serves as a collection of all the Java programs I write while exploring and mastering the concepts of **Object-Oriented Programming (OOP)**.

Whether you're a beginner trying to understand OOP principles or someone looking to revise Java concepts, feel free to explore, use, and contribute to this repository.

---

## **Contents** 📂
The repository is structured into folders representing different OOP topics for better organization:

1. Introduction & Concepts 🏗️

* OOP Introduction
* Java Classes
* Example of a Class
* Java Objects
* Class vs Object
* Properties of Object
* Objects Introduction
* How to access instance variables?
* How to create objects?
* Dynamic Memory Allocation
* How to manipulate objects?
* Java Constructors
* By Default Constructor
* Creating Constructors
* `this` keyword
* Constructor Overloading
* Calling a constructor from another constructor
* Wrapper Classes
* `final` keyword
* Garbage Collection

2. Packages, Static, Singleton Class, In-built Methods 📦⚡

* Java Packages
* `import` statement
* Static elements example
* `static` in Java
* Static variable meaning
* Non-static member inside a static
* Static member inside a non-static
* `this` keyword inside static
* Initialisation of static variables
* Singleton Class

3. Principles - Inheritance, Polymorphism, Encapsulation, Abstraction 💡🔒

* Principles of OOP
* Inheritance
* `private` keyword
* `super` keyword
* Single Inheritance
* Multiple Inheritance
* Hierarchical Inheritance
* Hybrid Inheritance
* Polymorphism
* Types of Polymorphism
* Static Polymorphism
* Overloading
* Dynamic Polymorphism
* Overriding
* How Overriding Works?
* `final` keyword
* Can we override static methods?
* Encapsulation
* Abstraction
* Encapsulation vs Abstraction

4. Access Control, In-built Packages, Object Class 🔑

* Example: private, public and protected modifiers
* Rules for modifiers
* When to use which modifier?
* In-built Packages
* `lang` package
* `io` package
* `util` package
* `applet` package
* `net` package
* Object Class
* Object Methods
* hashCode Method
* equals Method

5. Abstract Classes, Interfaces, Annotations 📝

* Multiple Inheritance Problem
* Abstract Classes
* Abstract Constructors
* Object of an Abstract Class
* Abstract Static Methods
* Static Methods in Abstract Classes
* `final` Keyword in Abstract Class
* Multiple Inheritance using Abstract Classes
* Interfaces
* Variable of Interface Type
* Separate Classes in Same Interface
* Extending Interfaces
* Annotations
* Important point regarding Static Interface methods
* Nested Interfaces

6. Generics, Custom ArrayList, Lambda Expressions, Exception Handling, Object Cloning ⚙️

* Custom ArrayList
* Problem with Custom ArrayList
* Custom ArrayList using Generics
* Working with Generics
* Using Java Wildcards
* Comparison Objects
* Lambda Functions
* Exception Handling
* Exception Handling Keywords
* Creating Custom Exception
* Object Cloning
* Shallow and Deep Copy
* Explanation of Shallow Copying
* Explanation of Deep Copying

7. Collections Framework, Vector Class, Enums in Java 🛠️

* Collections Framework
* Need of Collection Framework in Java
* Understanding Collection Framework
* Vector Class
* Vector Synchronisation
* Vector Code Example
* Enums in Java
* Enum Inheritance

---

## **How to Use** 🚀
- Clone or download this repository:
```bash
git clone https://github.com/yourusername/Java-OOPs-Learning.git

- Navigate through the folders to explore codes for each OOP concept.

- Run the programs in your Java IDE (e.g., IntelliJ IDEA, Eclipse, or VS Code).
```bash
javac file_name.java # For Compilation
java file_name.java # For Execution

## **Contributing** 🤝

If you'd like to contribute or add more examples:

1. **Fork** the repository.



2. **Create a new branch**:
```bash
git checkout -b new-feature

3. **Commit your changes**:
```bash
git commit -m "Added examples for polymorphism"

4. **Push to the branch**:
```bash
git push origin new-feature

5. **Submit a pull request** to the main branch.

## **Acknowledgement** 🌟

A big thanks to all the Java tutorials, mentors, and documentation that have helped me in my learning journey! Special gratitude to the open-source community for inspiring this repository. 🙌