,
☆──────────────────────────────────────☆
net q (水瓶座) 于 2002年07月09日21:45:14 星期二 提到:
What"s difference between an a trct cla and an interface?
Both methods are a tract.
☆──────────────────────────────────────☆
boo (二当家~将e进行到底) 于 2002年07月09日22:08:40 星期二 提到:
More than one interface can be implemented by one cla , while
only one a tract cla can be extended by one cla .
☆──────────────────────────────────────☆
lejun (Lejun) 于 2002年07月09日22:14:30 星期二 提到:
what"s more, a tract cla es can have non-a tract methods, which mea the
po ibility of default behavior.
提到: 】: More than one interface can be implemented by one cla , while
☆──────────────────────────────────────☆
boo (二当家~将e进行到底) 于 2002年07月09日22:25:16 星期二 提到:
right
☆──────────────────────────────────────☆
net q (水瓶座) 于 2002年07月09日22:42:08 星期二 提到:
and i think A tract cla can have no Data member while Interface can?
☆──────────────────────────────────────☆
XML (爱是我们的优势策略 *_^) 于 2002年07月09日23:18:59 星期二 提到:
a childCla "is" its father a tract cla while it "like" the interface it i
mplemented.
☆──────────────────────────────────────☆
net q (水瓶座) 于 2002年07月10日00:20:02 星期三 提到:
I find it interesting that if i define an a tract cla and a subCla tha
t i have to implemetn all its" a tract function, but if i defiene another c
la that is the subCla "s subCla (Sorry for the ambigious statment) i don
"t have to implement all the function.
seems it doe t see the very original a tract as its parent cla but only
the subcla
☆──────────────────────────────────────☆
XML (爱是我们的优势策略 *_^) 于 2002年07月10日00:38:39 星期三 提到:
of coz, for u have implemented all the a tract methods in the second cla .
&am , in the third cla , u actually "override" i tead of "implement" some of
these methods.
☆──────────────────────────────────────☆
lejun (Lejun) 于 2002年07月10日08:55:31 星期三 提到:
Yes, this is what the a tract cla trying to do.
That mea "in order to make me work, you must do ...", while the normal
cla mea "I can work, do as you wish"
btw: if you don"t like anyone to modify the action of some method, it is
keyword "final" that would be useful.
☆──────────────────────────────────────☆
net q (水瓶座) 于 2002年07月10日11:57:17 星期三 提到:
Thank you all.
What I was actually confused is that the third cla ignore the first cla (
because it is not required no to implement all the a tract methods). But it
"s a subCla of the firs in my option.
So does it mean the third cla only take the second cla as its parent?


