Start learning →

Which access modifier cannot be applied directly to a top-level class?

Apublic
Bdefault
Cpackage
Dprivate
Answer & Solution
Correct answer: D. private
Java prohibits declaring a top-level outer class with the private modifier.
Practise this question with Quill — ICSE Class 10 →

Keep practising Classes, Encapsulation and Scope

Browse all Classes, Encapsulation and Scope questions for ICSE Class 10, or explore more Computer Applications topics.

Start a Classes, Encapsulation and Scope lesson →