Single Choice Not Set

QWhat is the result of compiling and running the following code?
class Base{
        public Base(){
                System.out.print("Base");
        }
}
public class Derived extends Base{
        public Derived(){
                this("Examveda");
                System.out.print("Derived");
        }
        public Derived(String s){
                System.out.print(s);
        }
        public static void main(String[] args){
                new Derived();
        }
}

ID: #2253 Inheritance in Java MCQ 3,622 views
Question Info
#2253Q ID
Not SetDifficulty
Inheritance in Java MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A ExamvedaDerived
  • B ExamvedaBaseDerived
  • C BaseExamvedaDerived
  • D ExamvedaDerivedBase
Correct Answer

Explanation

BaseExamvedaDerived

Share This Question

Challenge a friend or share with your study group.