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
Смотрите видео Java 15 new features | Records in Java 15 | Java Beam онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Java Beam 20 Сентябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 513 раз и оно понравилось 10 людям.