If a class is declared without any access modifiers, where may the class be accessed

A class that is declared without any access modifiers is said to have package access. Thismeans that the class can only be accessed by other classes and interfaces that are definedwithin the same package.

Showing Answers 1 - 1 of 1 Answers

Chielo

  • Apr 10th, 2007
 

If a class declared without an access modifier,It will have what called a Default access, and can be access by members in the package.It is worthwhile to note the difference between the Default and Protected modifier as it can be confusing 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions