Question: Animal is an interface that specifies a single method identified as speak(). The Dog class implements the Animal interface. In addition to the speak method,

Animal is an interface that specifies a single method identified as speak(). The Dog class implements the Animal interface. In addition to the speak method, the Dog class also has a method called wagTail. Consider the following code. Animal a = new Dog(); a.wagTail(); Which of the following is true about this code segment? a) It will result in a compile-time error. b) It will result in a run-time error. c) It will call the speak method defined in the Animal interface. d) It will call the wagTail method defined in the Dog class. e) none of the above are true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!