what will be the output of the followinf code? Please explain it in brief
which of the following methods inserted independently at the indicated line in the following code can cause it to compile correctly?
class SuperBase { } class Base extends SuperBase { } class Derived extends Base { }
class CovariantTest1 { public Base getIt() { return new Base(); } }
class SubCovariantTest extends CovariantTest1 { // insert code here
}
select any 2 options: [a] public Derived getIt() { return new Derived(); } [b] public Base getIt() { return new Derived(); } [c] public SuperBase getIt() { return new Derived(); } [d] public SuperBase getIt() { return new Base(); } [e] public Derived getIt() { return new Base(); }
Life is easy because we write the source code.....