Question 10
Consider the Java code given below.
class Screen { void showContent() { System.out.println("Display on screen"); }}class TV extends Screen { void showContent() { super.showContent(); System.out.println("Display on TV"); } void showContent(String s) { System.out.println("Display on TV: " + s); }}class Monitor extends TV { void showContent() { super.showContent(); System.out.println("Display on monitor"); } void showContent(String s) { System.out.println("Display on monitor: " + s); }}class Test { public static void main(String[] args) { TV obj = new Monitor(); // LINE 1 obj.showContent(); obj.showContent("News"); // LINE 2 }}