Java
From the JVM and the first class to lambdas, records and virtual threads, Spring Boot, JPA and JUnit, Groovy and the wider JVM, the Java language and its ecosystem as told through the free samples of the Leanpub books about Java.
Created from the free samples of 24 Leanpub books and the descriptions and tables of contents of 35 more, with every source cited.
Java is a statically typed, object-oriented programming language whose source is compiled to bytecode and run by the Java Virtual Machine (JVM), which manages memory with a garbage collector and lets a program compiled once run on any operating system that has a JVM.[1] It was developed at Sun Microsystems in the 1990s under James Gosling, borrowed its syntax from C and C++ to appeal to the programmers of the day, and passed to Oracle when Oracle bought Sun in 2010.[1] Its early hold on developers, as one source lists it, came from being object-oriented from the start, doing away with pointers and manual memory deallocation, and having threads, exception handling and packaging into reusable jar files built in.[2]
Today the word covers more than the language. The platform ships twice a year, in March and September, with long-term support releases every few years, of which Java 8, 11, 17 and 21 are the ones most projects stand on;[8] Java 21 brought virtual threads, which one source calls the most important change of its release.[9] Around the language sits an ecosystem the sources describe as too large to summarise: several JVMs, three major IDEs, the Maven and Gradle build tools, the JUnit test framework, and other languages, among them Groovy, Kotlin and Scala, that compile to the same bytecode.[1] On the server, Spring Boot is the base that the library's books on web applications, security, testing, data access and AI all assume.
This article follows the subject from the language outward: where to begin, the history, the language itself, design and architecture, Spring and the web, persistence, messaging and security, testing, tools and deployment, and the wider JVM. Its sources are the free samples of the Leanpub books listed at the end, with the descriptions and tables of contents of the books whose samples were not available, and every claim that rests on a source is cited to it.
Where to start
Two sources assume no Java at all. Java For Testers is written for people approaching the language for the first time, in particular to add automation to their testing, and it inverts the usual order: every example runs as a JUnit test inside the IDE rather than as a compiled application with a main method, because, the author says, testers use Java differently and rarely build standalone programs.[3] It stops at Java 1.7 by design, so a reader should take its basics and pick up lambdas elsewhere.[3] Java Programming for Raspberry Pi needs no prior Java either and teaches the language, Maven, JavaFX and Spring Boot through Raspberry Pi hardware projects, in a 2026 edition updated yearly since 2022.[28] For a reader with some programming behind them, On Java 8 is the full textbook, 1,820 pages built around Java 8 with the features through Java 17 in marked subsections.[5] Modern Java: Second Edition is the short survey, which says basic Java helps but is not required.[1]
Once past Hello World, Java OOP Done Right takes a reader who can write variables, conditionals and classes and teaches object-oriented design in Java 11 syntax,[4] and Java Challengers reviews the fundamentals in two chapters before working through more than seventy coding challenges towards generics, streams, modules and concurrency.[27] A working developer catching up has the release guides: What's New in Java 8 for Java 8, which assumes a good understanding of Java 7,[6] From Java 11 to Java 17 and From Java 17 to Java 21 for the two long-term support jumps,[8] and JDK8 to 25 - A practical migration guide for a migration from JDK 8 straight to 25.[29] Elegant Java is a checklist of fifty-five current idioms for the same reader.[30]
On the server, Taming Thymeleaf builds a first Spring Boot web application for a beginner who has only Java,[13] Study Guide for Spring is a compact, objective-by-objective path through the framework,[37] and Spring Boot 4 In Practice is for experienced Spring developers, with an addendum for newcomers.[38] The specialist books are High-Performance Java Persistence on JDBC, JPA and Hibernate, which assumes Java, SQL and some ORM use,[10] Design Patterns in Modern Java for a reader who already knows the classic patterns,[31] Java Cryptography: Tools and Techniques for cryptography with Bouncy Castle,[47] and, across the JVM,