Classes and Objects – Multiple Choice Questions (MCQs)
-
-
38. What is an anonymous inner class in Java?
-
39. What is the output of the following code? `interface MyInterface { void show(); } public class AnonymousInner { public static void main(String[] args) { MyInterface obj = new MyInterface() { public void show() { System.out.println(\Anonymous\"); } }; obj.show(); } }`"""