JAVA 界的大神进.When designing a class,what factors determine whether a particular method,or instancevariable,should be hidden,or made available outside that class?希望能有英文的回答,对不起每分了,
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 12:14:39
JAVA 界的大神进.When designing a class,what factors determine whether a particular method,or instancevariable,should be hidden,or made available outside that class?希望能有英文的回答,对不起每分了,
JAVA 界的大神进.
When designing a class,what factors determine whether a particular method,or instance
variable,should be hidden,or made available outside that class?
希望能有英文的回答,
对不起每分了,
JAVA 界的大神进.When designing a class,what factors determine whether a particular method,or instancevariable,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...