Given:
3. public class MyBird extends Bird { 4. public static String sing() { return "fa"; } 5. public static void main(String[] args) { 6. MyBird t = new MyBird(); 7. Bird s = new MyBird(); 8. System.out.println(t.sing() + " " + s.sing()); 9. } 10. } 11. class Bird { public static String sing() { return "la"; } }
What is the result?
B is correct.
The code is correct, but polymorphism doesn't apply to static methods.