关于接口interface

偶看书赶紧写下吧,
接口永远不能实例化,example:
ISpeak speaker = new ISpeak;
is wrong
必须通过创建一个从接口派生的类,并创建此类的实例,example:
class Cat:ISpeak
{
       ...........
}
Cat anastasia = new Cat();

right

posted @ 2004-06-17 22:49  xiahaitao  阅读(392)  评论(0)    收藏  举报