Strange autogenerated getter and setter in eclipse

前端 未结 3 1390
慢半拍i
慢半拍i 2021-01-18 18:35

When I use the auto generation for getter/setter in Eclipse for an class field with a name like
String lAttr it will produce this:

public St         


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-18 18:54

    It is possible to give your own names of getter/setter in eclipse. Make your variable private. Go to error where you are trying to access private variable in another class. Select the quick fix of generating getter/setter. It pops up a dialog where getter/setter names are modifiable.

提交回复
热议问题