Question -
What is the output for the below code ? interface A{ public void printValue(); } 1. public class Test{ 2. public static void main (String[] args){ 3. A a1 = new A(){ 4. public void printValue(){ 5. System.out.println("A"); 6. } 7. }; 8. a1.printValue(); 9. } 10. }
Options:
A .  Compilation fails due to an error on line 3
B .  A
C .  Compilation fails due to an error on line 8
Submit Your Solution hear: