Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
interface vs. extending
- From: mtrembla@xxxxxxxxxxx (Marc Tremblay)
- Subject: interface vs. extending
- Date: Thu, 30 Sep 1999 11:32:05 -0600
You'd have to try it, I doubt it would be noticeable. I would tend to choose the best design for my situation. A good OO design should really come first. Also, if performance is extremely critical maybe Java isn't the best environment for the solution. However, I find Java to be more than fast enough for everything I've tried to get it to do these days. -- Marc At 10:13 AM 9/30/99 -0700, Howard Lee wrote: >Thanks Marc. What about Abstract class and Interface then? Which one's more >expensive? Thanks. > >> >> 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 >> 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
- References:
- interface vs. extending
- From: Marc Tremblay
- interface vs. extending
- From: Howard Lee
- interface vs. extending
- Prev by Date: EJB vs Servlets
- Next by Date: Awt exceptions
- Previous by thread: interface vs. extending
- Next by thread: interface vs. extending
- Index(es):