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
Watch video Java 15 new features | Records in Java 15 | Java Beam online without registration, duration hours minute second in high quality. This video was added by user Java Beam 20 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 513 once and liked it 10 people.