This repository contains examples and demonstrations of Object-Oriented Programming (OOP) concepts implemented in Java. It serves as a comprehensive reference for understanding and applying OOP principles in Java applications.
- Comprehensive demonstration of Java syntax and OOP concepts
- Examples of classes, objects, inheritance, encapsulation, and polymorphism
- Practical implementations of various Java programming techniques
- Docker support for easy execution in containerized environments
- Classes and Objects: Creating and using Java classes and objects
- Encapsulation: Using access modifiers (public, private, protected)
- Inheritance: Extending classes and reusing code
- Polymorphism: Method overloading and overriding
- Abstraction: Abstract classes and interfaces
- Inner Classes: Regular inner classes and static nested classes
- Variable declarations and types
- Constructors and method implementations
- Control structures (if-else, switch, loops)
- Exception handling with try-catch-finally
- Arrays and collections
- Static and instance methods
- Wrapper classes and autoboxing
- Java Development Kit (JDK) 11 or higher
- Docker (optional, for containerized execution)
Clone the repository and compile the Java files:
javac App.java
java AppThe repository includes a Dockerfile for containerized execution:
# Build the Docker image
docker build -t java-oop-examples .
# Run the container
docker run -it java-oop-examples