Styrow.dev
Question 129 of 247
Java Topic: General medium

Can a top level class be private or protected?

Question

Can a top level class be private or protected?

Answer

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