Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

interface vs. extending


  • From: howardl@xxxxxxxx (Howard Lee)
  • Subject: interface vs. extending
  • Date: Thu, 30 Sep 1999 10:13:43 -0700

Thanks Marc. What about Abstract class and Interface then? Which one's more
expensive? Thanks.

> -----Original Message-----
> From: Marc Tremblay [mailto:mtrembla@xxxxxxxxxxx]
> Sent: Thursday, September 30, 1999 9:25 AM
> To: Howard Lee; Advanced-Java
> Subject: Re: interface vs. extending
>
>
> Extending a superclass it at least as expensive as implementing an
> interface in that you'll never construct the interface but you'll have to
> construct any superclasses (not seperate instances, just the
> super() calls)
> when constructing the subclass.  I would think the difference would be
> negligible though.
>
> If you don't need member fields or private implementation functions than I
> would say go for the interface as it's a more flexible approach.
> Otherwise
> look at using an abstract class.
>
> -- Marc
>
> At 09:07 AM 9/30/99 -0700, Howard Lee wrote:
> >Hi,
> >
> >Which one is more expensive? Implementing an interface or
> extending a super
> >class that just contains method signatures? Thanks.
> >
> >Howard
> >
> >
> >---
> >To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> >To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
>
>
> Marc Tremblay
> Web Programer
> EyeWire Inc.
> http://www.eyewire.com/
>
>
> ---
> To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
> To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
>


---
To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx
To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx