In this project, I practised and discussed the new features from Java 11 to Java 17, the last LTS of Java, released on 13 September 2021.
I published an article at Medium discussing the features.
Features:
- Switch expression
- Records
- Text block
- Sealed class
- Pattern matching
- Others
- Improved NullPointerException stack trace
- New methods in String class i.e,
indent(int n),transform(java.util.function.Function function) - New method
mismatch()in Files class - Local interface and enum
The new features help us to write less code. Interestingly, at compile time, some of these advance syntax like - Text block, Pattern matching, change the classes to our basic old java
classes, which can be found at /out folder.