Skip to main content

About encapsulation and modifiers

No replies
Joined: 2004-06-14

Hello !

Modifiers: protected, private and all, ansure a member of a class (attribute or method) is not visible from outside it's declared block or package.

But can't we have more sophisticated modifiers on a method or a class to ensure that there are no method or attribute call from inside toward outside the block (method, class or package).

This could give us robust code.