A
Q. What is the output for the below code?
interface A{
public void printValue();
}
public class Test{
public static void main (String[] args){
A a1 = new A(){
public void printValue(){
System.out.println("A");
}
};
a1.printValue();
}
}
- Correct Answer - Option(B)
- Views: 21
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.