Skip to content
CalliCoder

37 tutorials

Java tutorials

Every Java guide on the site, newest first. Each one is built around code you can run.

Java has changed more in the last decade than in the two before it. Records, sealed types, pattern matching in switch, virtual threads and a six-month release cadence have all landed since Java 8, and a great deal of material written for the language still assumes none of them exist. The guides collected here state the release they were written against, because on this subject that is the difference between working code and a compile error.

The coverage falls into three groups. The first is the standard library as you actually use it: collections and their performance characteristics, streams, Optional, the java.time API that replaced Date and Calendar, and string handling. The second is concurrency — threads, executors, CompletableFuture, the memory model, and the parts of java.util.concurrent that exist so you do not have to write them. The third is the language itself, including the features that make older idioms unnecessary.

Every article shows complete, compilable files rather than fragments. Where behaviour is easier to see than to describe, the guide prints output rather than asserting what would happen — which for anything involving threads is the only way to make the point stick.

Two areas get more space than their share of the language, because they cause more trouble than their share of the language. Collections is the first: the difference between ArrayList and LinkedList is not academic when a list is iterated in a loop, HashMap behaviour depends on equals and hashCode being written as a pair, and the concurrent collections exist for reasons worth understanding before reaching for one. The second is date and time, where the pre-Java-8 classes are mutable, not thread-safe, and still turn up in code being written today.

Where a modern feature makes an older idiom unnecessary, the article says so directly. A guide that teaches SimpleDateFormat without mentioning that DateTimeFormatter replaced it, or that shows anonymous inner classes where a lambda now fits, is teaching something you will have to unlearn.

If you are working through this section rather than arriving from a search, the order that works is language first, then collections, then concurrency. Each layer assumes the one before it, and concurrency in particular is much harder to reason about without a clear picture of how objects and references behave.

All Java tutorials

Frequently asked questions

Which Java version do these tutorials target?

Each article names its version. Anything written against a specific release says so at the top, and where a feature arrived later than Java 8 that is called out inline.

Do I need an IDE to follow along?

No. Every example builds with Maven or Gradle from the command line, and the commands are shown.

Where should I start with concurrency?

Threads and the executor framework first, then CompletableFuture for composing asynchronous work. The memory model makes far more sense once you have written something that races.

Are these suitable for interview preparation?

The algorithms and collections material overlaps heavily with interview topics, and there is a dedicated interview section.

Are records, sealed types and pattern matching covered?

Yes, alongside the older constructions they replace, so it is clear what the newer feature is for.

Why so much attention to equals and hashCode?

Because HashMap and HashSet behaviour depends on them being consistent, and a mismatched pair produces a bug that looks like data loss rather than a contract violation.