Single Choice
Not Set
QWhat will be the output?
1. public interface InfA{
2. protected String getName();
3. }
public class Test implements InfA{
public String getName(){
return "test-name";
}
public static void main (String[] args){
Test t = new Test();
System.out.println(t.getName());
}
}
ID: #2287
Java Interfaces And Abstract Classes MCQ
2,137 views
Question Info
#2287Q 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
Compilation fails due to an error on lines 2
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic