interface也是Object类的子类
证明如下
……
public static void xxx(Runnable run)
{
System.out.print(run.toString() + run.hashCode());
}
……
编译可以通过,而
Runnable
接口本身只有
run
方法,所以
interface
的父类确实是
Object
,
Runnable
继承了
Object
的
toString
和
hashCode
方法。
接口可以多重继承
证明如下
……
public class MyInterface extends Runnable,Collection,FileFilter
{
……
}
编译可以通过。