MCQ
Single Best Answer
Not Set
QYou have the following code in a file called Test.java
class Base{
public static void main(String[] args){
System.out.println("Hello");
}
}
public class Test extends Base{}
What will happen if you try to compile and run this?
ID: #2112
Declaration and Access Control in Java
2,059 views
Question Info
#2112Q ID
Not SetDifficulty
Declaration and Access Control in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Compiles and runs printing
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic