Learn Java

About Learn Java

Learn Java is a free course that teaches Java from the first line of code to a small web service. It has 81 lessons in 10 parts, about 73 hours of reading, running code and practice, written for Java 25.

Who writes it

Learn Java is written and maintained by Basith. You can find more of his work on GitHub and LinkedIn.

How the lessons are made

Every lesson is written for someone who has never programmed, and builds only on the lessons before it. Each one starts by saying what you will be able to do by the end, explains one idea at a time in plain words with examples to run, and includes questions to check yourself.

Most examples run right in the page. An interpreter built for this course runs the Java one step at a time, so you can watch each variable, loop pass and array change instead of guessing. Code that needs a full JDK, such as threads working together or a database, is shown with the output it prints.

The lessons follow the official sources: the Java documentation on dev.java and docs.oracle.com, and the JDK Enhancement Proposals that introduced each newer feature. Most lessons end with links to that further reading.

Each lesson shows the date it was last updated, and the course is revised as Java changes. If you spot a mistake or a part that does not make sense, report it by email and it will be fixed.

The course in numbers

Learn Java at a glance
Lessons81, in 10 parts
Time to finishAbout 73 hours
Java versionJava 25, the current long-term support release
Code examplesMore than 1,000, most of them runnable in the page
Guides10 short answers to the questions people search for most
Glossary296 terms in plain English
Cheat sheets14 sheets of syntax and library reminders
PriceFree, with nothing to sign up for
Last updated26 October 2026

Start with the first lesson, or look something up in the glossary.