Return to site

JAVA CERTIFICATION QUESTION: Anonymous inner classes in Java

· java,ocp

When a subclass has a name that’s not visible in the source code (and, in general, not even predictable), it’s called an anonymous class.

Given the code👇👇👇


What is the result? Choose one.

A. Standalone

B. Inner

C. Compilation of the main(...) method fails

D. Compilation of the doIt(...) method fails







·ꓛ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ ·uoᴉsnʅɔuoꓛ