---
title: "java几个新知识点"
author: "mhbjava"
date: "2006-09-05T12:47:00Z"
tags: []
slug: "java"
draft: false
lastmod: "2006-09-05T12:47:00Z"
id: 26592
url: "https://mhbjava.iteye.com/blog/26592"
---

*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

{

       ……

}

编译可以通过。