4 ms·
Your first example works fine until void a() Parent.a() calls Parent.d() and you need the code to call B.d(). An interface also works but you end up cutting an
by Retric 19y ago
Your first example works fine until void a() Parent.a() calls Parent.d() and you need the code to call B.d().
An interface also works but you end up cutting and pasting a lot of the same code between the two classes.