1、new 出来的都是静态加载类,一招出错,全盘皆输;
2、动态加载类
Class c = Class.forName(args[0]);
OfficeAble oa = (OfficeAble)c.newInstance();//OfficeAble定义的功能类型接口
2、动态加载类
Class c = Class.forName(args[0]);
OfficeAble oa = (OfficeAble)c.newInstance();//OfficeAble定义的功能类型接口
2016-10-29