Question: package q06; public class Main { public static void main(final String argv) { //implement the necessary interface and abstract class hierarchy // B::foo // B::foo

package q06; public class Main { public static void main(final String argv) { //implement the necessary interface and abstract class hierarchy // B::foo // B::foo // B::foo I ib = new B(); A ab = new B(); B bb = new B(); go(ib); go(ab); go(bb); } private static void go(final I i) { i.foo(); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!