Java Programming
Learn Java with small programs that print numbers, use variables, work with arrays, repeat actions, make decisions, and call methods.
Foundations
- Hello, Numbers!
printing numbers, arithmetic, and parentheses
- Variables
declaring, updating, and using variables
- Arrays
creating, reading, and changing arrays
- Loops
repeating work and processing array values
- Conditionals
if, else, and else-if decisions
- Functions
Java methods, arguments, and return values
Data Types
- Primitive Types
primitive values
- Strings
text values and characters
- String Operations
cleaning and searching text
- Type Conversion
converting Java values
- Wrapper Classes
primitive wrappers
Control Flow
- Switch Statements
switch cases and defaults
- Loop Patterns
counting loop patterns
- Break and Continue
early exits and skipped work
- Nested Loops
loops inside loops
Arrays & Collections
- Two-Dimensional Arrays
rows and columns
- ArrayList
resizable lists
- HashMap
key-value mappings
- HashSet
unique set members
- Stacks and Queues
stack and queue order
Methods & Scope
- Method Overloading
matching method calls
- Scope and Lifetime
where variables exist
- Static Methods
methods on a class
- Varargs
variable argument lists
Object-Oriented Basics
- Classes
classes and objects
- Constructors
initializing objects
- Encapsulation
controlled object state
- The this Keyword
current object references
OOP Intermediate
- Inheritance
parent and child classes
- Polymorphism
one type, many behaviors
- Abstract Classes
incomplete parent classes
- Interfaces
object contracts
OOP Advanced
- Default Interface Methods
shared interface behavior
- Static Interface Methods
class-level interface methods
- Sealed Classes
restricted class hierarchies
- Inner and Nested Classes
classes inside classes
Exceptions
- Try and Catch
handling exceptional cases
- Throw and Throws
raising and declaring failures
- Custom Exceptions
application-specific failures
- Try-with-Resources
automatic resource cleanup
Modern Java Types
- Enums
named constant sets
- Enum Fields and Methods
enum-specific behavior
- Records
compact data carriers
- Optional
optional values
Generics
- Generics
reusable typed code
- Generic Bounds
limits on type parameters
- Wildcards
flexible generic types
- Generic Methods
method-level type parameters
Functional Programming
- Lambda Expressions
functions as values
- Functional Interfaces
single-method contracts
- Method References
shorthand for lambdas
- Streams
pipelines over collections
Stream Operations
- Stream Filter and Map
selection and transformation
- Stream Reduce
combining stream values
- Stream Collect
collecting pipeline results
- Parallel Streams
parallel pipeline behavior
Pattern Matching
- instanceof Pattern Matching
tested type values
- Switch Pattern Matching
type cases in a switch
- Record Patterns
matching record data
- Guarded Patterns
conditions on matched values
Common Algorithms
- Linear Search
checking items one by one
- Binary Search
halving a sorted search range
- Bubble Sort
neighboring swaps
- Selection Sort
selecting the next value
- Merge Sort
divide and merge
- Recursion
methods that call themselves
- Recursion Examples
recursive problem examples
String Processing
- StringBuilder
mutable text construction
- String Formatting
formatted output
- Regular Expressions
patterns for text
- Regular Expression Patterns
regular expression tasks
Date & Time
- LocalDate
calendar dates
- LocalTime
clock times
- Date-Time Formatting
date-time text
- Date Calculations
calendar arithmetic
Math & Numbers
- BigDecimal
decimal arithmetic
- BigInteger
arbitrary-precision integers
- Math Functions
common numeric operations
- Random Values
seeded random examples
Utilities
- Arrays Utility Methods
array operations
- Collections Utility Methods
collection operations
- Objects Utility Methods
object helper methods
- Comparators
custom ordering rules
Testing and Debugging
- Precondition Checks
checking inputs early
- Result Status
success and failure values
- Table-Driven Tests
repeated cases from data
- Debug Traces
observing program steps
- Boundary Tests
edge values
- Timing Probe
measuring elapsed work
Files and Paths
- Join Path Segments
joining path parts
- Normalize a Path
simplifying paths
- Write and Read a File
file input and output
- Read Lines
line-based file input
- Check Whether a File Exists
file existence checks
- List a Directory
Count directory entries and select matching names.
Annotations and Reflection
- Class Literals
class metadata
- Method Lookup
runtime method metadata
- Custom Annotations
Define metadata and read it at runtime.
- Read Fields with Reflection
Find a field and read its value from an object.
- Look Up Constructors
Find a constructor and create an object with reflection.
- Enum Reflection
enum metadata
Data Pipeline Patterns
- Input Normalization
consistent input forms
- Validation Summary
reporting valid and invalid fields
- Permission Matrix
permissions by role and action
- Batch Transform
repeatable batch processing
- Retry Plan
planned retries
- Configuration Merge
defaults and overrides
Concurrency Basics
- Start and Join Threads
thread lifecycle
- Shared Counter
coordinated shared state
- Client and Service Classes
request and response flow
- Worker Pipeline
producer and consumer work