Java 8 The main changes of the Java 8 release were these: Lambda Expression and Stream API Method Reference Default Methods Type Annotations Repeating Annotations Method Parameter Reflection Java 9 Java 9 introduced these main features: Java Module System Try-with-resources Diamond Syntax with Inner Anonymous Classes Private Interface Methods Java 10 Implicit Typing with var Java 11 Local Variable Type in Lambda Expressions Java 14 Switch Expressions days = switch (month) { case JANUARY, MARCH, MAY, JULY, AUGUST, OCTOBER, DECEMBER -> 31; case FEBRUARY -> 28; case APRIL, JUNE, SEPTEMBER, NOVEMBER -> 30; default -> throw new IllegalStateException(); }; Java 15 Text Blocks Java 16 Pattern Matching of instanceof defining variable Car c and Bicycle b public class PatternMatching { public static double price(Vehicle v) { if (v instanceof Car c) { return 10000 - c.kilomenters * 0.01 - (Calendar.getInstance().get(Calendar.YEAR) - c.year) * 100; } else if (v instanceof Bicycle b) { return 1000 + b.wheelSize * 10; } else throw new IllegalArgumentException(); } } Records : we cannot extend a record class Java 17 Sealed Classes The final modifier on a class doesn’t allow anyone to extend it What about when we want to extend a class but only allow it for some classes? public sealed class Vehicle permits Bicycle, Car {...}