A Java HashMap finds keys with hashCode and equals, so a broken contract or a key changed after put makes entries vanish. Learn the rules, why TreeSet uses compareTo instead, and which collection to pick.
Java splits exceptions into checked ones the compiler makes you handle and unchecked ones it doesn’t. Learn try, catch and finally, how to throw and wrap exceptions well, and how try-with-resources closes things in reverse order.
Sealed types give Java a closed list of subtypes, and pattern matching lets a switch test and take apart each one. Together they turn a forgotten case into a compile error instead of a silent bug.
Interfaces say what a type can do, inheritance hands a class everything its parent does, and composition wraps an object instead. Learn default methods, super, abstract classes and the fragile base class trap by running small programs.
A Java record declares a small immutable data class in one line, and the compiler writes its constructor, accessors, equals, hashCode and toString. Learn what records give you, what they refuse, and where they fall short.
Java strings never change, so every edit builds a new one. Learn the String methods and their traps, why += in a loop copies everything, StringBuilder, text blocks, Unicode, and arrays with the Arrays helpers.
A Java class describes what an object holds and what it can do, and a constructor decides how each object starts life. Learn fields, this, constructors, private, static and final by running small programs.
Java’s if and loops look like C’s, with a few rules that catch real bugs. The old switch falls through by default, and switch expressions fix that while making the compiler check every enum value.
Every Java variable holds either a primitive value or a reference to an object. Knowing which one explains silent overflow, pass-by-value, == versus equals, and why two Integers holding 128 aren’t equal.
Java 25 runs a single source file with one command and a bare void main, with no class wrapper to write first. Learn what the JDK contains, why Java 25 is the version to learn, and how to read compiler errors and exceptions.