A comprehensive Java learning journey from Core Programming to Advanced Java, DSA, OOPs, Design Patterns, JUnit Testing, IO Programming & Multithreading โ documented branch by branch.
Dev Pratap Singh ๐ GitHub: @devps814 ๐ฆ Repo: BridgeLabz-Training-Java-Programming
- About This Repository
- Branch Overview
- Tech Stack
- Setting Up Java (JDK/JRE/JVM)
- How to Run Java Files
- GitHub โ Push Your Code
- Useful Learning References
- Acknowledgements
This repository is a complete log of my Java training at BridgeLabz. It is organized into topic-specific branches, each containing hands-on problem sets, concept explorations, and real-world exercises โ progressing from Java fundamentals all the way through to advanced topics like multithreading, design patterns, and test-driven development.
Each branch represents a dedicated learning module. The code follows clean naming conventions and is self-contained with comments explaining the logic.
๐ Note: This repository is actively growing. New branches for Database, Backend Development, Spring Boot, and more will be added as training progresses.
๐ 1. Core_Programming Branch
The foundation of the entire Java journey. This branch covers all essential building blocks of Java programming.
| Topic | What Was Covered |
|---|---|
| Java Fundamentals | Introduction to Java, role of JDK, JRE & JVM, writing first Java program, public static void main |
| Java Programming Elements | Variables, data types (int, float, char, boolean, long), type casting, operators (arithmetic, relational, logical, bitwise, assignment), operator precedence & associativity |
| Control Flow | if, if-else, else-if, switch-case, for, while, do-while loops, nested loops, break & continue |
| Java Arrays | 1D and 2D array declaration & initialization, array traversal, searching (linear, binary), sorting (bubble, selection), array-based problem solving |
| Java Methods | Creating and calling methods, method overloading, return types, passing arguments by value, modular programming |
| Java Strings | String class, string creation (literal vs new), string comparison (equals, ==), common methods: charAt(), substring(), indexOf(), length(), toUpperCase(), toLowerCase() |
| Built-In Functions | Math class (pow, sqrt, abs, round, ceil, floor), Arrays utility class, intro to Java Collections |
| String Handling | Mutable vs immutable strings, StringBuilder & StringBuffer, performance comparison, string reversal & manipulation |
๐ ๏ธ Tech Stack: Java SE, JDK, Eclipse / IntelliJ IDEA
๐ References:
๐ 2. OOps Branch
Deep dive into Object-Oriented Programming โ the core paradigm of Java.
| Topic | What Was Covered |
|---|---|
| Classes & Objects | Defining classes, creating objects, class structure, instance members, real-world object modeling |
| Constructors | Default constructor, parameterized constructor, constructor overloading, use of this keyword |
| Variables & Modifiers | Instance vs static variables, local variables, access modifiers (public, private, protected, default) |
| Java Keywords | static, final, this, instanceof, super โ practical examples for each |
| Inheritance | Single & multilevel inheritance, method overriding, super keyword, IS-A relationship |
| Polymorphism | Compile-time (method overloading) and runtime polymorphism (method overriding), dynamic method dispatch |
| Abstraction | Abstract classes, abstract methods, interfaces, implements keyword, difference between abstract class and interface |
| Encapsulation | Data hiding using private fields, getters & setters, JavaBeans convention |
| UML & Diagrams | Object-oriented modelling, class diagrams, understanding relationships โ aggregation vs composition vs association |
๐ ๏ธ Tech Stack: Java SE, OOP Principles, UML Diagrams
๐ References:
๐ 3. DSA Branch
Data Structures and Algorithms implemented from scratch in Java โ the backbone of problem-solving and technical interviews.
| Topic | What Was Covered |
|---|---|
| Arrays & Strings | Advanced array manipulation, two-pointer technique, sliding window, string-based DSA problems |
| Linked List | Singly linked list, doubly linked list, circular linked list โ insert, delete, traverse, reverse operations |
| Stack | Stack using arrays & LinkedList, push, pop, peek, balanced parentheses, expression evaluation |
| Queue | Simple queue, circular queue, deque (double-ended queue), priority queue |
| Trees | Binary Tree, Binary Search Tree (BST), tree traversals (inorder, preorder, postorder, level-order), height & depth |
| Sorting Algorithms | Bubble sort, selection sort, insertion sort, merge sort, quick sort โ time & space complexity analysis |
| Searching Algorithms | Linear search, binary search, recursive binary search |
| Hashing | HashMap, HashSet, collision handling, frequency counting problems |
| Recursion | Recursive thinking, base case & recursive case, factorial, Fibonacci, Tower of Hanoi |
๐ ๏ธ Tech Stack: Java SE, Java Collections Framework
๐ References:
๐ 4. Advanced_java Branch
Advanced Java features that power modern enterprise and functional programming.
| Topic | What Was Covered |
|---|---|
| Java Collections Framework | ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, LinkedHashMap, Stack, Queue, PriorityQueue โ CRUD operations and iteration |
| Generics | Generic classes, generic methods, bounded type parameters (<T extends ...>), wildcards |
| Exception Handling | try, catch, finally, throw, throws, checked vs unchecked exceptions, custom exceptions |
| Java 8 Features | Lambda expressions, functional interfaces (Predicate, Function, Consumer, Supplier), method references |
| Streams API | stream(), filter(), map(), flatMap(), collect(), reduce(), sorted(), distinct(), limit(), count() |
| Optional | Optional.of(), Optional.empty(), isPresent(), orElse(), orElseGet() โ null-safe programming |
| Date & Time API | LocalDate, LocalTime, LocalDateTime, DateTimeFormatter, Period, Duration |
| Annotations | Built-in annotations (@Override, @Deprecated, @SuppressWarnings), custom annotations |
๐ ๏ธ Tech Stack: Java SE 8+, Java Collections, Streams API, Lambda Expressions
๐ References:
- Oracle Java 8 Features
- Baeldung โ Java 8
- GeeksForGeeks โ Java Collections
- JavaPoint โ Exception Handling
๐ 5. JUnit Branch
Test-Driven Development (TDD) using JUnit 5 inside a Maven project โ industry-standard Java testing.
| Topic | What Was Covered |
|---|---|
| Maven Project Setup | Creating Maven project structure (pom.xml), adding JUnit 5 dependency, understanding src/main and src/test |
| JUnit 5 Basics | @Test, @BeforeEach, @AfterEach, @BeforeAll, @AfterAll, test lifecycle |
| Assertions | assertEquals, assertNotEquals, assertTrue, assertFalse, assertNull, assertNotNull, assertThrows |
| Parameterized Tests | @ParameterizedTest, @ValueSource, @CsvSource, @MethodSource |
| Test Suites | Grouping tests, @Tag, running specific test groups |
| Mocking Concepts | Introduction to Mockito, mocking dependencies, @Mock, @InjectMocks, verify() |
| TDD Workflow | Red โ Green โ Refactor cycle, writing tests before implementation |
๐ ๏ธ Tech Stack: Java SE, JUnit 5, Maven, Mockito (intro)
๐ References:
๐ 6. DesignPattern Branch
Classic software design patterns โ the reusable solutions to commonly occurring problems in software design.
| Category | Pattern | What Was Covered |
|---|---|---|
| Creational | Singleton | Only one instance, lazy vs eager initialization, thread-safe Singleton |
| Creational | Factory Method | Object creation without specifying the exact class, loose coupling |
| Creational | Abstract Factory | Family of related objects without specifying concrete classes |
| Creational | Builder | Step-by-step object construction, fluent builder pattern |
| Structural | Adapter | Bridge between incompatible interfaces |
| Structural | Decorator | Dynamically add responsibilities to objects |
| Structural | Facade | Simplified interface to a complex subsystem |
| Behavioral | Observer | Event-driven publish-subscribe mechanism |
| Behavioral | Strategy | Define a family of algorithms, encapsulate each one, make them interchangeable |
| Behavioral | Iterator | Sequential access to elements without exposing underlying structure |
๐ ๏ธ Tech Stack: Java SE, OOP Principles, UML
๐ References:
- Refactoring Guru โ Design Patterns
- GeeksForGeeks โ Design Patterns in Java
- JavaPoint โ Design Patterns
- Head First Design Patterns (Book)
File handling, input/output streams, and the power of concurrent programming with Java threads.
| Topic | What Was Covered |
|---|---|
| File Handling | File class, creating/deleting/renaming files, checking file properties |
| Byte Streams | FileInputStream, FileOutputStream, reading & writing bytes |
| Character Streams | FileReader, FileWriter, BufferedReader, BufferedWriter โ reading/writing text files |
| Serialization | Serializable interface, ObjectInputStream, ObjectOutputStream, transient keyword |
| Java NIO | Path, Files, Paths, Files.readAllLines(), Files.write(), Files.copy() |
| Thread Basics | Creating threads via Thread class and Runnable interface, thread lifecycle (New โ Runnable โ Running โ Waiting โ Dead) |
| Thread Synchronization | synchronized keyword, race conditions, inter-thread communication (wait(), notify(), notifyAll()) |
| Executor Framework | ExecutorService, Executors.newFixedThreadPool(), Future, Callable |
| Concurrency Utilities | CountDownLatch, CyclicBarrier, Semaphore, ReentrantLock |
๐ ๏ธ Tech Stack: Java SE, Java IO, Java NIO, Java Concurrency (java.util.concurrent)
๐ References:
- Oracle Java IO Tutorial
- Baeldung โ Java Multithreading
- GeeksForGeeks โ Multithreading
- JavaPoint โ Java IO
๐ 8. Review Branch
A dedicated branch for revision, mixed practice problems, and consolidation exercises spanning all topics covered during training.
| What's Inside |
|---|
| Revision problems covering Core Java, OOPs, Collections, and DSA |
| Cross-topic exercises that combine multiple concepts |
| Mock problem sets for interview preparation |
| Refactored/cleaned versions of earlier code |
| Notes and concept summaries |
๐ ๏ธ Tech Stack: Java SE (all concepts combined)
| Tool / Technology | Purpose |
|---|---|
| Java SE 8+ | Primary programming language |
| JDK (Java Development Kit) | Compiler (javac) + tools |
| JRE (Java Runtime Environment) | Runs compiled .class files |
| JVM (Java Virtual Machine) | Platform-independent execution engine |
| Maven | Build tool & dependency management (JUnit branch) |
| JUnit 5 | Unit testing framework |
| Eclipse / IntelliJ IDEA | IDE for development |
| Git & GitHub | Version control & code hosting |
Your Java Code (.java)
โ
javac (JDK Compiler)
โ
Bytecode (.class file)
โ
JVM (Java Virtual Machine) โ inside JRE
โ
Machine Code (runs on your OS)
| Component | Full Form | Role |
|---|---|---|
| JDK | Java Development Kit | Contains compiler (javac), debugger, tools. You need this to write & compile Java |
| JRE | Java Runtime Environment | Contains JVM + libraries. You need this to run Java programs |
| JVM | Java Virtual Machine | Converts bytecode to machine code. Makes Java platform-independent |
๐ก Simple rule: Install JDK โ it includes JRE which includes JVM.
1. Download JDK
- Go to: https://www.oracle.com/java/technologies/downloads/
- Choose your OS (Windows / macOS / Linux) and download the latest JDK
2. Install JDK
- Run the installer and follow on-screen instructions
- Note the installation path (e.g.,
C:\Program Files\Java\jdk-21)
3. Set Environment Variables
Windows:
1. Search "Environment Variables" in Start Menu
2. Under System Variables โ click "New"
Variable name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk-21
3. Find "Path" variable โ Edit โ Add:
%JAVA_HOME%\bin
4. Click OK โ Apply
macOS / Linux:
# Add to ~/.bashrc or ~/.zshrc
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
export PATH=$JAVA_HOME/bin:$PATH
# Apply changes
source ~/.bashrc4. Verify Installation
java -version
javac -versionYou should see the installed version number โ
# Step 1 โ Navigate to the folder containing your .java file
cd path/to/your/folder
# Step 2 โ Compile the Java file
javac FileName.java
# Step 3 โ Run the compiled class (no .java extension!)
java FileNameExample:
cd Core_Programming/ControlFlow
javac WhileLoopDemo.java
java WhileLoopDemo# Configure your identity
git config --global user.name "Dev Pratap Singh"
git config --global user.email "your-email@example.com"# 1. Initialize Git (only once per project)
git init
# 2. Connect to your GitHub repository
git remote add origin https://github.com/devps814/BridgeLabz-Training-Java-Programming.git
# 3. Check which branch you're on
git branch
# 4. Switch to / create your working branch
git checkout -b Core_Programming
# or switch to existing branch
git checkout Core_Programming
# 5. Check what files were changed
git status
# 6. Stage all changes
git add .
# 7. Commit with a meaningful message
git commit -m "Add control flow exercises โ loops and conditionals"
# 8. Push to GitHub
git push -u origin Core_Programming# Pull latest changes from remote
git pull origin Core_Programming
# See commit history
git log --oneline
# See difference in changed files
git diff
# Undo last commit (keeps changes)
git reset --soft HEAD~1
# List all branches
git branch -a- Fork this repository ๐ด
- Create a new branch for your topic:
git checkout -b feature/your-topic - Commit your changes with clear messages ๐
- Push to your fork and submit a Pull Request ๐
- Huge thanks to BridgeLabz for the structured training program and mentorship ๐
- Inspired by the Java open-source community and fellow trainees
- References from Oracle docs, Baeldung, GeeksForGeeks, JavaPoint, and Refactoring Guru
As training progresses, the following branches will be added:
| Branch (Planned) | Topics |
|---|---|
Database |
JDBC, MySQL, SQL queries from Java |
Backend |
Servlet, JSP, REST API basics |
SpringBoot |
Spring Core, Spring Boot, Spring MVC, REST APIs |
Hibernate |
ORM, Entity mapping, HQL |
โญ If you find this helpful, please star the repository! โญ
Made with โค๏ธ by Dev Pratap Singh | BridgeLabz Java Training