Java Programming

Learn Java with small programs that print numbers, use variables, work with arrays, repeat actions, make decisions, and call methods.

Foundations

  1. Hello, Numbers!

    printing numbers, arithmetic, and parentheses

  2. Variables

    declaring, updating, and using variables

  3. Arrays

    creating, reading, and changing arrays

  4. Loops

    repeating work and processing array values

  5. Conditionals

    if, else, and else-if decisions

  6. Functions

    Java methods, arguments, and return values

Data Types

  1. Primitive Types

    primitive values

  2. Strings

    text values and characters

  3. String Operations

    cleaning and searching text

  4. Type Conversion

    converting Java values

  5. Wrapper Classes

    primitive wrappers

Control Flow

  1. Switch Statements

    switch cases and defaults

  2. Loop Patterns

    counting loop patterns

  3. Break and Continue

    early exits and skipped work

  4. Nested Loops

    loops inside loops

Arrays & Collections

  1. Two-Dimensional Arrays

    rows and columns

  2. ArrayList

    resizable lists

  3. HashMap

    key-value mappings

  4. HashSet

    unique set members

  5. Stacks and Queues

    stack and queue order

Methods & Scope

  1. Method Overloading

    matching method calls

  2. Scope and Lifetime

    where variables exist

  3. Static Methods

    methods on a class

  4. Varargs

    variable argument lists

Object-Oriented Basics

  1. Classes

    classes and objects

  2. Constructors

    initializing objects

  3. Encapsulation

    controlled object state

  4. The this Keyword

    current object references

OOP Intermediate

  1. Inheritance

    parent and child classes

  2. Polymorphism

    one type, many behaviors

  3. Abstract Classes

    incomplete parent classes

  4. Interfaces

    object contracts

OOP Advanced

  1. Default Interface Methods

    shared interface behavior

  2. Static Interface Methods

    class-level interface methods

  3. Sealed Classes

    restricted class hierarchies

  4. Inner and Nested Classes

    classes inside classes

Exceptions

  1. Try and Catch

    handling exceptional cases

  2. Throw and Throws

    raising and declaring failures

  3. Custom Exceptions

    application-specific failures

  4. Try-with-Resources

    automatic resource cleanup

Modern Java Types

  1. Enums

    named constant sets

  2. Enum Fields and Methods

    enum-specific behavior

  3. Records

    compact data carriers

  4. Optional

    optional values

Generics

  1. Generics

    reusable typed code

  2. Generic Bounds

    limits on type parameters

  3. Wildcards

    flexible generic types

  4. Generic Methods

    method-level type parameters

Functional Programming

  1. Lambda Expressions

    functions as values

  2. Functional Interfaces

    single-method contracts

  3. Method References

    shorthand for lambdas

  4. Streams

    pipelines over collections

Stream Operations

  1. Stream Filter and Map

    selection and transformation

  2. Stream Reduce

    combining stream values

  3. Stream Collect

    collecting pipeline results

  4. Parallel Streams

    parallel pipeline behavior

Pattern Matching

  1. instanceof Pattern Matching

    tested type values

  2. Switch Pattern Matching

    type cases in a switch

  3. Record Patterns

    matching record data

  4. Guarded Patterns

    conditions on matched values

Common Algorithms

  1. Linear Search

    checking items one by one

  2. Binary Search

    halving a sorted search range

  3. Bubble Sort

    neighboring swaps

  4. Selection Sort

    selecting the next value

  5. Merge Sort

    divide and merge

  6. Recursion

    methods that call themselves

  7. Recursion Examples

    recursive problem examples

String Processing

  1. StringBuilder

    mutable text construction

  2. String Formatting

    formatted output

  3. Regular Expressions

    patterns for text

  4. Regular Expression Patterns

    regular expression tasks

Date & Time

  1. LocalDate

    calendar dates

  2. LocalTime

    clock times

  3. Date-Time Formatting

    date-time text

  4. Date Calculations

    calendar arithmetic

Math & Numbers

  1. BigDecimal

    decimal arithmetic

  2. BigInteger

    arbitrary-precision integers

  3. Math Functions

    common numeric operations

  4. Random Values

    seeded random examples

Utilities

  1. Arrays Utility Methods

    array operations

  2. Collections Utility Methods

    collection operations

  3. Objects Utility Methods

    object helper methods

  4. Comparators

    custom ordering rules

Testing and Debugging

  1. Precondition Checks

    checking inputs early

  2. Result Status

    success and failure values

  3. Table-Driven Tests

    repeated cases from data

  4. Debug Traces

    observing program steps

  5. Boundary Tests

    edge values

  6. Timing Probe

    measuring elapsed work

Files and Paths

  1. Join Path Segments

    joining path parts

  2. Normalize a Path

    simplifying paths

  3. Write and Read a File

    file input and output

  4. Read Lines

    line-based file input

  5. Check Whether a File Exists

    file existence checks

  6. List a Directory

    Count directory entries and select matching names.

Annotations and Reflection

  1. Class Literals

    class metadata

  2. Method Lookup

    runtime method metadata

  3. Custom Annotations

    Define metadata and read it at runtime.

  4. Read Fields with Reflection

    Find a field and read its value from an object.

  5. Look Up Constructors

    Find a constructor and create an object with reflection.

  6. Enum Reflection

    enum metadata

Data Pipeline Patterns

  1. Input Normalization

    consistent input forms

  2. Validation Summary

    reporting valid and invalid fields

  3. Permission Matrix

    permissions by role and action

  4. Batch Transform

    repeatable batch processing

  5. Retry Plan

    planned retries

  6. Configuration Merge

    defaults and overrides

Concurrency Basics

  1. Start and Join Threads

    thread lifecycle

  2. Shared Counter

    coordinated shared state

  3. Client and Service Classes

    request and response flow

  4. Worker Pipeline

    producer and consumer work