Which modifier is used to specify that a method Cannot be used outside a class?

Any variable, method, or class declared to use the default access modifier cannot be accessed by any other class outside of the package from which it was declared.

Sizin İçin Seçtik  Which of the following modifier on members of a class that is not accessible to another class in different package but is accessible to any subclass in the same package?

Leave a Reply

Your email address will not be published. Required fields are marked *