Skip to content

yossef-ashraf/OOP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java OOP Examples Repository

Overview

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.

Features

  • 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

OOP Concepts Demonstrated

  • 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

Code Examples Include

  • 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

Getting Started

Prerequisites

  • Java Development Kit (JDK) 11 or higher
  • Docker (optional, for containerized execution)

Running the Examples

Clone the repository and compile the Java files:

javac App.java
java App

Using Docker

The 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

About

Object-Oriented Programming (OOP) concepts implemented in Java.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors