Java中 extends A, B

最近看Java线程池相关的源码发现居然存在这样的代码:

public interface RunnableFuture<V> extends Runnable, Future<V> {
    /**
     * Sets this Future to the result of its computation
     * unless it has been cancelled.
     */
    void run();
}

难道Java可以多继承??? 瞬间凌乱了…
后来实验发现,Java居然可以通过以下方式实现多继承:

interface A {
	public void aa();
}
interface B {
	public void bb();
}
interface C extends A, B {
	public void cc();
}
class D implements C {
	@Override
	public void aa() {
	}
	@Override
	public void bb() {
	}
	@Override
	public void cc() {
	}
}

这个有什么用呢???
俺暂时还没有研究,弄明白后补上…

你可能感兴趣的:(Java)