Given:
class Animal { /*from w ww.ja v a2 s. c o m*/ private void fly() { System.out.print("bang "); } } public class Bird extends Animal { public static void main(String[] args) { new Bird().go(); } void go() { fly(); // Animal.fly(); // line A } private void fly() { System.out.print("sh-bang "); } }
Which are true? (Choose all that apply.)
B and F are correct.
Since Animal.fly()
is private, it can't be overridden.
It is invisible to class Bird.
A, C, D, and E are incorrect based on the above.