How to automatically generate getters and setters in Android Studio

后端 未结 15 1231
太阳男子
太阳男子 2020-12-02 04:15

Is there a shortcut in Android Studio for automatically generating the getters and setters in a given class?

15条回答
  •  温柔的废话
    2020-12-02 05:11

    for macOS, +N by default.

    Right-click and choose "Generate..." to see current mapping. You can select multiple fields for which to generate getters/setters with one step.

    See http://www.jetbrains.com/idea/webhelp/generating-getters-and-setters.html

提交回复
热议问题