Is private class possible in Java? 1 April 2022 Enpatika.com Genel 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 are the four types of nested classes in Java?