Generate constructors and accessor methods

Quickly generate common code constructs such as Constructors, Getters and Setters.

You can use ⌘N (macOS) / Alt+Insert (Windows/Linux) for the Generate menu and then select Constructor, Getter, Setter or Getter and Setter. In the popup, select which fields to include.

Interested in JVM Development?

call to action image

IntelliJ IDEA allows you to generate many more methods too!

Learn More


Related Resources

Create an Editor Fold
Create an Editor Fold
Create an editor fold to hide parts of your class which can make it more readable.
Generate Overrides for equals(), hashCode() and toString()
Generate Overrides for equals(), hashCode() and toString()
We can generate the code to override the equals and hashCode methods.
Surround With
Surround With
Surround your code with common programming constructs.