Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » Java与OOP初步  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于接口的概念
nihaoll





发贴: 2
积分: 0
于 2006-02-23 09:34 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
public interface A{}
public interface B{}
public interface C{}
public class E{}
public class F{}

一个接口可以继承多个接口
public interface A extends B,C{}
一个类可以实现多个接口
public class E implements A,B{}

那么多个类可以实现一个接口吗?
public class E implements A{}

public class F implements A{}
请高手指教,谢谢



作者 Re:关于接口的概念 [Re:nihaoll]
Libra_1016





发贴: 13
积分: 0
于 2006-02-23 10:56 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
is sure ..


    I want to sleep very much ....
作者 Re:关于接口的概念 [Re:nihaoll]
nihaoll





发贴: 2
积分: 0
于 2006-02-23 11:09 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢了。


作者 Re:关于接口的概念 [Re:nihaoll]
rivalhw





发贴: 1
积分: 0
于 2006-02-28 17:00 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
当然可以了


作者 Re:关于接口的概念 [Re:nihaoll]
XiaoN





发贴: 3
积分: 0
于 2006-03-01 22:51 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可以实现,不过一个类只能有一个基类,java的多继承是靠内部类和接口实现的


作者 Re:关于接口的概念 [Re:nihaoll]
jsmile

Life is good



发贴: 127
积分: 52
于 2006-03-02 21:25 user profilesend a private message to usersend email to jsmilesearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
多个类可以实现一个接口 - 这正是接口的用意。


************************************
Luck is when preparation meets opportunity
************************************
作者 Re:关于接口的概念 [Re:nihaoll]
gyang373





发贴: 6
积分: 0
于 2006-03-03 20:59 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我无语


作者 Re:关于接口的概念 [Re:nihaoll]
rr253





发贴: 9
积分: 0
于 2006-03-13 21:04 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
看来楼主对继承的理解不够。。。。
接口的目的就是为了对继承的说阿




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923