Multiple choice technology programming languages

Which class cant have explicit constructors?

  1. Inner Class

  2. Sub class

  3. Private Class

  4. Anonymous class

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Anonymous classes are declared and instantiated simultaneously, making it impossible to declare explicit constructors. They can only use instance initializers or pass arguments to the superclass constructor.