作业帮 > 综合 > 作业

JAVA 界的大神进.

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/01 10:59:30
JAVA 界的大神进.
When designing a class,what factors determine whether a particular method,or instance
variable,should be hidden,or made available outside that class?
希望能有英文的回答,
对不起每分了,
封装Encapsulation
Encapsulation can control the visitation access and hidden the process logic. For accesss control, you can take 'protected' as exmaple. For hidden example, you can give an example for setter and getter() of the property...