Question 1
Consider the Java code given below.
class Monitor { public void screenSize() { System.out.println("Normal screen size"); } public void resolution() { System.out.println("Normal resolution"); }}class LCD extends Monitor { public void screenSize() { System.out.println("Screen size is large"); }}class LED extends Monitor { public void screenSize() { System.out.println("Screen size is medium"); } public void resolution() { System.out.println("HD resolution"); }}public class Test { static void show(Monitor[] monitors) { for (int i = 0; i < monitors.length; i++) { monitors[i].screenSize(); monitors[i].resolution(); } } public static void main(String[] args) { Monitor[] monitors = {new LCD(), new LED()}; // LINE 1 show(monitors); }}Choose the correct option.
