We need to write a lot of low-value, repetitive code to write a simple data carrier class responsibly: constructors, accessors, equals(), hashCode(), toString(), etc. To avoid this repetitive code, Java is planned to use record.
It is used to compact the class declaration syntax with record. Records Preview feature has been introduced in JDK 14.
This JEP proposes to incorporate feedback-based improvements and re-preview the feature to support additional forms of local classes and interfaces in the Java 15.
It include below updates along with Preview features proposed in Java 14.
Records and Sealed Types
Local records
Annotations on records
#JavaBeam #RecordsInJava15 #Java15NewFeatures #java
On this page of the site you can watch the video online Java 15 new features | Records in Java 15 | Java Beam with a duration of hours minute second in good quality, which was uploaded by the user Java Beam 20 September 2020, share the link with friends and acquaintances, this video has already been watched 545 times on youtube and it was liked by 10 viewers. Enjoy your viewing!