Skip to main content

Complete Java Course

Eighteen articles to learn Java with code compiled and run on JDK 21: syntax, OOP, collections, exceptions, I/O, streams, concurrency, the JVM, testing with JUnit and Mockito, SOLID, patterns, Maven and Gradle, up to the dependency injection that prepares you for Spring.

This series collects 18 articles (approximately 267 minutes of total reading time), designed for a level Beginner. The main topics covered are Java, JDK 21, OOP, collections.

18Articles267 minTotal reading timeBeginnerLevel
JavaJDK 21OOPcollectionsJUnitSpring

Series Articles

  1. 1

    01 - Java Programming Fundamentals

    A hands-on start with Java: how javac and the JVM work, which JDK to install, your first program run for real, bytecode and naming conventions.

  2. 2

    02 - Data Types and Flow Control

    Pick the right Java type for each value, see what goes wrong when you choose badly, and control the flow with if, switch and loops, with code run on JDK 21.

  3. 3

    03 - Methods and Basic Data Structures

    Write Java methods with the right signature, avoid overload ambiguity, know what pass by value does to your data, and work with arrays, matrices and Arrays.

  4. 4

    04 - OOP: Fundamental Concepts

    Build Java classes whose objects defend their own data: constructors, encapsulation, this, static members and records, with listings run on JDK 21.

  5. 5

    05 - Abstraction and Contracts: Interfaces and Abstract Classes

    Abstract classes, interfaces, polymorphism and sealed types in Java 21: the real compiler errors when a contract is broken, and how to choose.

  6. 6

    06 - Java Core APIs: String, Date and Wrappers

    String, StringBuilder, wrapper classes and java.time in Java, each starting from a concrete trap, with listings run on JDK 21 and fixed dates.

  7. 7

    07 - Collections Framework: List, Set and Map

    Lists, sets, maps and queues in Java 21: how to choose, the most common mistakes, and the timings measured on ArrayList, LinkedList and ArrayDeque.

  8. 8

    08 - Error Handling and Exceptions

    Checked and unchecked exceptions in Java 21, reading a stack trace, domain exceptions and try-with-resources, with the real compiler messages.

  9. 9

    09 - Input/Output and NIO.2

    Read and write files in Java with java.io and NIO.2: buffers, charsets, Path and Files, directories, serialization and its limits, with listings run on JDK 21.

  10. 10

    10 - Functional Programming and Stream API

    Lambdas, method references, streams, collectors and Optional in Java, with the traps that cost hours and the cases where a plain for loop is still better.

  11. 11

    11 - Concurrency and Multithreading

    Threads, race conditions, locks, executors, CompletableFuture and BlockingQueue in Java, in the order that keeps your data safe, with listings run on JDK 21.

  12. 12

    12 - JVM and Performance Tuning

    Stack, heap, garbage collector and JIT in OpenJDK 21: the -Xss, -Xms and -Xmx flags, GC logs and JFR, with real measurements and a memory leak reproduced.

  13. 13

    13 - Testing in Java: JUnit and Mockito

    Testing in Java with JUnit 5 and Mockito: assertions, parameterised tests, mock, stub and fake, and a TDD step from red to green, with real output.

  14. 14

    14 - Best Practices and Clean Code

    SOLID, naming, code smells and exception handling in Java, with run examples, showing how to make code easy to change and when not to apply the rules.

  15. 15

    15 - Fundamental Design Patterns

    Singleton, Factory, Builder, Strategy and Observer in Java 21: what each pattern gains and costs, with tested listings and Spring Boot backend examples.

  16. 16

    16 - Build Tools: Maven and Gradle

    Maven versus Gradle: lifecycle, dependency conflicts resolved in opposite ways, and a reading of the pom.xml of a real Spring Boot backend, with real runs.

  17. 17

    17 - Java in Production: Configuration and Logging with SLF4J

    Configuration outside the code, secrets in the environment and readable logs with SLF4J and the MDC in Java, with run listings and a real Spring Boot backend.

  18. 18

    18 - IoC and Dependency Injection: Before You Open Spring

    Inversion of Control and Dependency Injection in plain Java: a minimal container, repository as a domain port, and the check-then-write race.

Test your knowledge!

Have you read all the articles? Check how much you've learned by taking this series' quizzes.

Take the quiz!