Question: 20. What is the output of this program? import java.io.IOException; public class Derived { public void getDetails() throws IOException { System.out.println(Derived class); } }

20. What is the output of this program? import java.io.IOException; public class Derived { public void getDetails() throws IOException { System.out.println("Derived class"); } } public class Test extends Derived { public void getDetails() throws Exception { System.out.println("Test class"); } public static void main(String[] args) throws IOException { Derived obj = new Test(); obj.getDetails(); } }
Step by Step Solution
There are 3 Steps involved in it
The provided code snippet contains multiple syntax errors and is not a valid Java program I have cor... View full answer
Get step-by-step solutions from verified subject matter experts
