This project provides practical examples of core Java principles with simple, real-world implementations.
-
Polymorphism (Intermediate)
Example:PaymentProcessingExample.java– demonstrates interfaces and multiple implementations. -
Encapsulation (Beginner)
Example:BankAccountclass – protects its fields and enforces controlled access. -
Inheritance & Abstraction (Intermediate)
Example:Vehiclehierarchy – shows how subclasses inherit behavior and implement abstract methods. -
Collections Framework (Intermediate)
Examples: Use ofList,Set, andMapto manage groups of objects efficiently. -
Exception Handling (Beginner)
Example: Demonstratestry-catch-finallyblocks for robust error handling.
-
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 andDeque. -
Queue (Beginner)
Example:QueueExample.java– FIFO operations implemented withLinkedList. -
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.
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