Ask Question
27 September, 22:51

Can we declare top level classes as private or protected?

+4
Answers (1)
  1. 28 September, 01:40
    0
    Answer and Explanation:

    top level class can not be declare as private or protected. It is always public. If we declare a top level class as private then the compiler always complain that the private is not allowed and if we declare top level class as protected then compiler complain that modifier protection is not allowed here. so we can not declare top level class as private or protected
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Can we declare top level classes as private or protected? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers