gembin

OSGi JSF Eclipse RCP

 

abstract interface和interface的区别吗?

interface 本身就是abstract的,只不过没有明确的规定出来,说一定要把abstract这个关键字写上。
所以abstract interface 就是interface,两者根本没有区别。
在《java in a nutshell》里,
“All methods of an interface are implicitly abstract, even if the abstract modifier is omitted. ”
在《thinking in java》里,
 the abstract keyword, which allows you to create one or more methods in a class that have no definitions
—you provide part of the interface without providing a corresponding implementation, which is created by inheritors. 
The interface keyword produces a completely abstract class, one that provides no implementation at all.

所以结论就是 abstract interface 就是interface,两者根本没有区别。

posted on 2008-03-21 17:29 gembin 阅读(202) 评论(1)  编辑  收藏 所属分类: JavaSE

评论

# re: abstract interface和interface的区别吗? 2008-03-23 15:49 迎风十八刀

哦 我还以为有区别,原来晃点我  回复  更多评论   


标题  
姓名  
主页
验证码 *  
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2008-03-24 09:38 编辑过
 




导航

统计

常用链接

留言簿(2)

随笔分类(185)

随笔档案(182)

文章档案(1)

新闻档案(1)

相册

收藏夹(1)

Favorite Links

最新随笔

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜

60天内阅读排行