Single Choice
Not Set
QWhat 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. }
ID: #2286
Java Interfaces And Abstract Classes MCQ
1,218 views
Question Info
#2286Q ID
Not SetDifficulty
Java Interfaces And Abstract Classes MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
A
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic