Generate Overrides for equals(), hashCode() and toString()

We can generate the code to override the equals and hashCode methods.

You can use ⌘N (macOS) / Alt+Insert (Windows/Linux) for the Generate menu and then select equals() and hashCode(). You can also use the same shortcut again and select toString() to override that method as well.

Interested in JVM Development?

call to action image

IntelliJ IDEA can generate your getters and setters too!

Learn More

Related Resources

New live templates for main methods
New live templates for main methods
Create an instance main method using a live template.
Live templates for simple IO
Live templates for simple IO
Add simple IO methods using live templates.
Inlay Hints
Inlay Hints
Inlay hints provide additional information about your code.