阅读背景:

Getters and Setters和这个。关键词

来源:互联网 

I'm new to coding and I'm confused about getters and setters in Java. I know that getters and setters are used for encapsulation. But if you have a constructor that creates a person of a specific gender and length. Should both of these characteristics have a setter and a getter? I'm new to coding and I'm confused about getter




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: