1:必须是继承(extends),实现(implements) 才行2:必须要重写(覆盖)父类的方法。 转载于:https://www.cnblogs.com/liyunchuan/p/10663788.html