IntelliJ IDEA- Generate Getter & Setter Shortcut Key


Alt + Insert (Windows/Linux) or ⌘Cmd + N (macOS) is the shortcut keys to generate the getter and setter of the fields in IntelliJ IDEA.

Step 1: Open the class where you have declared the fields. Press the Alt + Insert key together from the keyboard and click on the Getter and Setter from the pop-up.

IntelliJ IDEA- Generate Getter & Setter Shortcut Keys

Step 2: Select the fields of which you want to generate the Getters and Setters. And click on the OK button.

Select fields to generate Getters and Setters- IntelliJ IDEA

References

  1. IntelliJ IDEA shortcut for Extract/Introduce Local Variable
  2. IntelliJ IDEA – Find file containing text shortcut
  3. Shortcut key to evaluate expression/variable in IntelliJ IDEA

Similar Posts

About the Author

Atul Rai
I love sharing my experiments and ideas with everyone by writing articles on the latest technological trends. Read all published posts by Atul Rai.