Question: public class Parent {public void doSomething(){/* Implementation not shown */}} public class Child extends Parent {public void doAnotherThing() {/* Implementation not shown */}} Which lines
public class Parent {public void doSomething(){/* Implementation not shown */}} public class Child extends Parent {public void doAnotherThing() {/* Implementation not shown */}} Which lines in the following code will compile without error? Explain your answer Child kid = new Child (); kid.doSomething();//line 1 kid.doAnotherThing();//line 2 a) Line 1 only b) Line 2 only c) Lines 1 and 2 d) Neither line will compile without error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
