Skip to content

lpatamia1/JavaConcepts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☕ Java Concepts

This project provides practical examples of core Java principles with simple, real-world implementations.

🔑 Core Concepts

  • Polymorphism (Intermediate)
    Example: PaymentProcessingExample.java – demonstrates interfaces and multiple implementations.

  • Encapsulation (Beginner)
    Example: BankAccount class – protects its fields and enforces controlled access.

  • Inheritance & Abstraction (Intermediate)
    Example: Vehicle hierarchy – shows how subclasses inherit behavior and implement abstract methods.

  • Collections Framework (Intermediate)
    Examples: Use of List, Set, and Map to manage groups of objects efficiently.

  • Exception Handling (Beginner)
    Example: Demonstrates try-catch-finally blocks for robust error handling.


📚 Data Structures

  • Linked List (Intermediate)
    Example: LinkedListExample.java – custom implementation of a singly linked list.

  • Stack (Beginner)
    Example: StackExample.java – push, pop, and peek operations using both arrays and Deque.

  • Queue (Beginner)
    Example: QueueExample.java – FIFO operations implemented with LinkedList.

  • Binary Search Tree (BST) (Advanced)
    Example: BinarySearchTreeExample.java – insert, search, and in-order traversal of nodes.

  • HashMap Usage (Intermediate)
    Example: HashMapExample.java – demonstrates storing and retrieving key-value pairs efficiently.


▶️ How to Run

Each example can be compiled and executed from the root directory of the project using the command line.

Example: Run the Polymorphism demo

# Compile the Java file into .class bytecode
javac com/java_journey/concepts/PaymentProcessingExample.java  

# Run using the fully qualified class name
java com.java_journey.concepts.PaymentProcessingExample  

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages