Can a top level class be private or protected?

Short Answer
Views 691

Answer:

No, a top level class can not be private or protected. It can have either "public" or no modifier.

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.