A
Q. What is the result of compiling and running the following code?
class Base{
private Base(){
System.out.print("Base");
}
}
public class test extends Base{
public test(){
System.out.print("Derived");
}
public static void main(String[] args){
new test();
}
}
- Correct Answer - Option(D)
- Views: 26
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.