Single Choice Not Set

QWhat is the expected output?
class Animal {
	Animal() {
		System.out.println("Animal");
	}
}
class Wild extends Animal{
	Wild() {
		System.out.println("Wild");
		super();
	}
}
public class Test {
	public static void main(String args[]) {
		Wild wild = new Wild();
	}
}

ID: #2172 Java Constructor and Methods 1,882 views
Question Info
#2172Q ID
Not SetDifficulty
Java Constructor and MethodsTopic

Choose the Best Option

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

  • A Animal Wild
  • B Wild Animal
  • C Runtime Exception
  • D Compilation Error
Correct Answer

Explanation

Compilation Error

Share This Question

Challenge a friend or share with your study group.