interfaceApda{}interfaceApdb{}interfaceAfactory{ApdacreateA();ApdbcreateB();}classApda1implementsApda{}classApdb1implementsApdb{}//有几个接口就有几个对应的方法classAfactory1implementsAfactory{publicApdacreateA(){Apdaapda=null;apda=newApda1();returnapda;}publicApdbcreateB(){