Is private class possible in Java?

No, we cannot declare a top-level class as private or protected . It can be either public or default (no modifier).

Sizin İçin Seçtik  What is a default access modifier?

Leave a Reply

Your email address will not be published. Required fields are marked *