How to automatically generate getters and setters in Android Studio

后端 未结 15 1252
太阳男子
太阳男子 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:15

    Just in case someone is working with Eclipse

    Windows 8.1 OS | Eclipse Idle Luna

    Declare top level variable private String username Eclipse kindly generate a warning on the left of your screen click that warning and couple of suggestions show up, then select generate.enter image description here

提交回复
热议问题