Java New Features

Java New Features - 10 Cards
Click here to toggle all cards
Java 5 New Features
Enhanced For Loop, Generics, Enums, Autoboxing
Java 8 New Features
Functional Programming - Lambdas & Streams, Static methods in interface
Java 9 New Features
Modularization (Java Platform Module System)
Local Variable Type Inference
Declare variables with inferred types using var
JShell
Interactive REPL tool for experimenting with code
Private methods in interfaces
Define private methods to reduce code duplication
Switch Expressions
Use switch statement as expression for more concise code
Text Blocks
Readable way to declare multi-line string literals (Between """ and """)
Record Classes
Concise way to declare classes mainly used for data
Record Example
public record Person(String firstName, String lastName, int age) { }