public abstract interface ????<转载>

public abstract interface 等效于 public interface

public interface 为隐式申明

在JDK文档中提到:

1>Think of an interface as a 100-percent abstract class.

2>深入的描述:

Typing in the abstract modifier is considered redundant; interfaces are implicitly abstract whether you type abstract or not. You just need to know that both of these declarations are legal, and functionally identical:

public abstract interface Rollable { }
public interface Rollable { }

The public modifier is required if you want the interface to have public rather than default access.

一句话描述: 在Interface申明时含不含abstract都一样!

//////////////////////////////////////////////////////////以下为错误描述//////////////////////////////////////////////////////

abstract interface 和单纯的interface的区别是:

   Class 和 Class 之间是 extends

InterfaceInterface 之间是 extends

Class 和 Interface 之间是 implements

Interface 和 abstract Interface 之间仅仅只能被你自己定义的接口extends,不可能implements, implements是Class和Interface之间的"专利"

一句话 就是 abstract interface 只能被interface继承,不能直接被类实现

posted @ 2009-09-15 16:20  规格严格-功夫到家  阅读(344)  评论(0编辑  收藏  举报