Which of the following is true about this code?
Suppose Animal is an interface that specifies a single method – speak. Now suppose the Dog class implements the
Animal interface. In addition to the speak method, the Dog class also has a method called wagTail. Now consider the
following code.
```
Animal a = new Dog();
a.wagTail();
```
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.
a) It will result in a compile-time error.
You might also like to view...
The small black square at the bottom-right corner of a cell is the ________
Fill in the blank(s) with correct word
A(n) ____ firewall provides the highest level of security and provides full application layer awareness without interposing a proxy server.
A. application gateway B. route-filtering C. packet-filtering D. proxy
In IPsec, authentication is accomplished by the ____ protocol.
A. Encapsulating Security Payload (ESP) B. ISAKMP/Oakley C. Authentication Header (AH) D. L2TP
By default, ____ is the instruction that starts the animation segment.
A. a mouse click B. pressing Enter C. pressing Tab D. advancing to a new slide