Re: Defining a constructor in an Interface



Lee Fesperman wrote:
Nope, it's still a bad idea. A decent implementation is likely to want additional arguments to its constructor. It pretty much kills multiple inheritance of interfaces because of conflicting constructor requirements. If your implementation wishes to extend another class with specific constructor requirements, you have no recourse.

There is more. Google for previous discussions on this.

I am not saying it is a good idea. I am just saying that I don't agree with Chris' claim:


That said, I don't think there's ever a good excuse for requiring a constructor that takes parameters.

/Thomas

--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
.