Given:
What is the result?
Given:
What is the result?
The code includes method overloading where the method chosen by the compiler depends on the reference type of the object, not the actual object type. In this case, the reference type of `a1` is `Animal` and the reference type of `a2` is `Dog`. The method `play` that takes an `Animal` object will be called for `a1` and will print `flips`. The method `play` that takes a `Dog` object will be called for `a2` and will print `runs`. Therefore, the output will be `flipsflips`.
B is correct
B is the correct answer. Tested in Intellij