Correct Answer: Boo f = new Bar() { };
Explanation:
Option A is incorrect because it passes an int to the Boo constructor, and there is no matching constructor in the Boo class.
Option C is incorrect because it violates the rules of polymorphismyou cannot refer to a superclass type using a reference variable declared as the subclass type. The superclass is not guaranteed to have everything the subclass has.
Option D uses incorrect syntax.
Discussion & Comments