
Modern Java
A long, example-driven tutorial teaching the new language and API features of Java 8.winterbe/java8-tutorial
- Stars
- 16.7k
- Forks
- 4k
- Licence
- MIT
- Language
- Java
- Last update
- 3.2 years ago
- Type
- Learning resource
No commits in over a year — check for forks or alternatives before adopting.
What it is
This is a written tutorial, not a program, that walks through the new features added in Java 8, such as lambda expressions, default interface methods, streams, and the new Date API. Each section pairs a short explanation with small commented code samples. It is useful for learning how Java code changed in that version.
- Learn how lambda expressions replace anonymous classes
- Practice method and constructor references with the provided examples
- Understand how streams, Optionals, and the Date API work in Java 8
Great for
- Java developers who work on older Java code and want to learn Java 8 features
- Students learning Java who want short, runnable-style examples
- Developers who already know Java and want a quick refresher on lambdas and streams
Not ideal for
- Readers who need the latest Java features, since the README points to a separate Java 11 tutorial for later versions
- People who want a software tool to install, because this is a guide to read rather than an application
How to get it
- 1
Read it online
You'll need: Java (Java 8 or later for running the examples)
Clone the repository
git clone https://github.com/winterbe/java8-tutorial - 2
Run it
- Open the README on GitHub or in the cloned folder
- Read the Default Methods and Lambda expressions sections first
- Copy the code samples into a Java file and run them with a Java 8 or later compiler
- 3
Get the most out of it
- Follow the table of contents and work through the sections in order
- Try modifying each code sample to see how the behavior changes
- Read the linked Java 11 tutorial from the README for newer features
Downloads
Strengths
- Short code samples with comments make concepts easy to follow
- Covers a broad set of Java 8 features in one place
- Free and open source under the MIT license
Trade-offs
- Covers only Java 8; newer language and API features are in a separate guide referenced in the README
- The README provided is truncated, so the full set of topics could not be fully verified here
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| java8-tutorial (this) | 16.7k | Learning resource | beginner | 3.2 years ago | Java developers who work on older Java code and want to learn Java 8 features |
| claude-howto | 46.4k | Learning resource | beginner | 4 days ago | Developers who have installed Claude Code and want to go beyond basic prompts |
| pure-bash-bible | 41.7k | Learning resource | intermediate | 2.9 years ago | Bash scripters who want fewer external dependencies in their scripts |
| first-contributions | 56.7k | Learning resource | beginner | 4 days ago | People who have never submitted a pull request to an open source project |
| learn-python | 18.5k | Learning resource | beginner | 7 months ago | Beginners who want to learn Python syntax by reading and running examples |
| raspberry-pi-os | 14k | Learning resource | advanced | 2.6 years ago | Students who want to understand how operating systems work at the lowest level |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.