class KeyBroad implements Extendbroadable{ public void inPut(){ System.out.println("n hi,keybroad has be input into then mainbroad!n"); } } class NetCardBroad implements Extendbroadable{ public void inPut(){ System.out.println("n hi,netCardBroad has be input into then mainbroad!n"); } } //上面完成了一个接口,分别实现,接下来就是统一调用 class CheckBroad{ public void getMainMessage(Extendbroadable ext){ ext.inPut(); } }