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

Re: Interface Question from Certification Study Group



It would introduce a maintenance nightmare from an inheritance
standpoint.  Suppose you needed to modify the method in some way
(hopefully you'd do this before making many classes that implement the
interface), you'd have to modify the subinterfaces as well.

--- Jamil Karim <jamkarim@yahoo.com> wrote:
> > 4.  It is possible to override this method by adding the method
> using
> > the same method signature as AuditedAccountingArtifact.  Is
> > this correct?
> 
> Yes, it is possible.  It doesn't change anything, as the method
> can't have any content (is abstract).
> 
> > 5.  And if is possible, why would you want to do this.  I doesn't
> > seem to provide any value.  What would be an example 
> > where it would be meaningful?
> 
> I believe the only purpose would be for clarity -- someone can
> open the subinterface and see the methods enforced in any
> implementing classes without having to look at superinterfaces.  
> Personally, I would rely on the html generated by javadoc to
> show people the methods coming from superinterfaces.
> 
> Later,
>  Jamil Karim
> 
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.com/
> 


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/