gembin

OSGi, Eclipse Equinox, ECF, Virgo, Gemini, Apache Felix, Karaf, Aires, Camel, Eclipse RCP

HBase, Hadoop, ZooKeeper, Cassandra

Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.

There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.

About Me

 

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 阅读(2144) 评论(2)  编辑  收藏 所属分类: JavaSE

评论

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

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

# re: abstract interface和interface的区别吗? 2009-03-11 23:32 aben

区别就是可以接口继承接口的时候可以extends接口  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

常用链接

留言簿(6)

随笔分类(440)

随笔档案(378)

文章档案(6)

新闻档案(1)

相册

收藏夹(9)

Adobe

Android

AS3

Blog-Links

Build

Design Pattern

Eclipse

Favorite Links

Flickr

Game Dev

HBase

Identity Management

IT resources

JEE

Language

OpenID

OSGi

SOA

Version Control

最新随笔

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜

free counters