·
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👇👇👇
final class Handler { public void handle() { System.out.print("Standalone"); } } public class App { public static void main(String[] args) { new App().doIt(new Handler() { public void process() { System.out.print("Inner"); } }); } public void doIt(Handler h) { h.handle(); } }
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ꓛ