Re: difference between inheritance and interface?
From: Collin VanDyck (thehoppocket_at_yahoo.com)
Date: 02/11/04
- Next message: DreamCoder: "Re: abstract class versus interface"
- Previous message: Ryan Stewart: "Re: difference between inheritance and interface?"
- In reply to: syntax: "difference between inheritance and interface?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 11 Feb 2004 20:42:45 GMT
By implementing an interface, your object guarantees that the methods laid
out in the interface will be implemented.
By extending a base class (inheritance), you inherit from the base class
public and protected instance methods and members. In other words, those
methods and members are accessible from your new object.
"syntax" <sanko50@yahoo.com.hk> wrote in message
news:5c553dbf.0402111228.18f3a7b2@posting.google.com...
> what is the difference between one level inheritance and one level
> implementation of interface ?
>
> i.e
>
>
>
> what is the difference between the following :
>
>
> class myclass extends abc
> {
> ...
> }
>
> AND
>
> class myclass implements interface_name
> {
> ...
> }
- Next message: DreamCoder: "Re: abstract class versus interface"
- Previous message: Ryan Stewart: "Re: difference between inheritance and interface?"
- In reply to: syntax: "difference between inheritance and interface?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|