Multiple choice technology testing

An anonnymous inner class have a constructor(but not parameterized one).

  1. True

  2. False

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

Anonymous inner classes in Java cannot have explicitly declared constructors. The compiler generates a default constructor, but developers cannot write constructors for anonymous classes. Only regular inner classes can have constructors.