Android Studio快速生成getter和setter方法

刚开始使用Android Studio时,在创建一个类时,快速生成get和set方法。

有两种方式:

方式一:Code-->Generate

方式二:通过快捷键Alt+Insert

如果需要为生成的get和set方法去掉变量前缀,即原变量名为mXxxx,希望得到的get和set方法为getXxxx()和setXxxx().

跟着箭头走

转载自: https://blog.csdn.net/u014744118/article/details/51532215   感谢博主

猜你喜欢

转载自blog.csdn.net/qq_34741578/article/details/81100618
今日推荐