DEVFYI - Developer Resource - FYI

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

Java Interview Questions and Answers (part 2)


(Continued from previous question...)

261. 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. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.

(Continued on next question...)

Other Interview Questions