Java Cup
Inside Java

News and views from members of the Java team at Oracle

Records Patterns, Performance and Serialization - JEP Café #8

This JEP Café discusses JEP 395: Records, released with JDK 16. We start with a short recap on what records are, then discuss the performances of the hash code computation with the hashCode() method, and the comparison of records using the equals() method. The performances are compared with the data objects offered by Kotlin and Lombok. We also cover record serialization and discuss patterns to serialize your legacy objects using records serialization (and get the security benefits of records serialization!).

Show Notes

Further reading and viewing:

JDK releases:

Additional Resources

JEP Café explores Java features and JDK Enhancement Proposals through tutorials and practical examples. Watch all episodes in the YouTube playlist. For more Java news, subscribe to our RSS feed and follow @Java on X.

Contact us.