抽象接口(abstract interface)与接口(interface)没有任何区别,所有接口中的方法缺省为抽象方法,所以在interface前是否有abstract修饰对方法的属性无任何影响。
下面是官方的说明:
“All of the methods in an interface (see the Interfaces section) are implicitly abstract, so the abstract modifier is not used with interface methods (it could be—it's just not necessary).”
详见:http://download.oracle.com/javase/tutorial/java/IandI/abstract.html
本文详细解析了抽象接口和接口之间的概念差异,重点强调了所有接口方法默认为抽象方法,无需使用abstract修饰符这一关键特性。
1302

被折叠的 条评论
为什么被折叠?



