How important are naming conventions for getters in Java?

前端 未结 6 1966
孤城傲影
孤城傲影 2021-02-08 10:12

I’m a huge believer in consistency, and hence conventions.

However, I’m currently developing a framework in Java where these conventions (specifically the get

6条回答
  •  你的背包
    2021-02-08 10:59

    The violation of the get/set convention in the Java library classes is most certainly a mistake. I'd actually recommend that you follow the convention, to avoid the complexity of knowing why/when the convention isn't followed.

提交回复
热议问题