VOOZH about

URL: https://inside.java/2023/11/10/jepcafe21/

⇱ Optimizing your equals() methods with Pattern Matching - JEP Cafe #21 - Inside.java


👁 Java Cup
Inside Java

News and views from members of the Java team at Oracle

Newscast | Podcast | JEP Café | Sip of Java
dev.java | Newsletter | About

Optimizing your equals() methods with Pattern Matching - JEP Cafe #21

by José Paumard on November 10, 2023

How can you write simple and performant equals() methods for your Java classes: the full tutorial.

Usually you do not write your equals() and hashCode() methods yourself. You delegate that to your IDE and forget about it. This JEP Café deep dives into the different solutions offered by Eclipse and IntelliJ, as well as Guava and Apache Commons Lang 3. It compares these solutions and checks the performance they offer on various real-life use cases. It also compares them with the Pattern Matching solution, available from Java 17 and Java 21.

About This Site | OpenJDK Community | Download Java

© 2026 Oracle Corporation and/or its affiliates

👁 Oracle Logo