🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8484

Re: extending interfaces and final variables in inner classes

#8484
From: Dave Bird
Date: Sat, 24 Mar 2001 18:46
45 lines
2499 bytes
In article <3abbda8f_2@dnews>, Yonatan Taub <yonatanta@bashan.co.il>
writes
>When extending an interface the syntax has to be
>
>public MyInterface extends AnotherInterface ...
>
>Why does the compiler issues a compilation error when using the syntax
>
>public MyInterface implements AnotherInterface

 
 Because if a normal (fully specified) class EXTENDS
 another normal (fully specified) class, then 
 it takes the original and adds new methods
 to produce something of a similar kind but enlarged.

 When a normal (fully specified) class IMPLEMENTS
 an interface (entirely abstract class), then
 it provides actual implementations for 
 all the abstract methods in the original
 as well as providing its own methods.


 Now what would you say an interface does to another interface:
 adds new methods to form something of essentially the same kind?
 or provides actual implementations for all the methods it 
 named as un-implemented abstract hooks ??

 An interface cannot "implement": it has no actual, as opposed
 to abstract, method with which to implement anything.


In<MPG.1525f34346561ad298a09f@forums.borland.com>, John McGrath: 
>the reason it does not is that an interface, in Java, 
 is a thing which (by definition) does not contain any implementation
 but can only BE IMPLEMENTED by a separate, actual class.

>So it would be rather strange to write that an interface 
>implements anything.

 

-- 
   ^-^-^-@@-^-;-^   http://www.xemu.demon.co.uk/
        (..)__u     news:alt.smoking.mooses
Technical Details
Message-ID: <B5NC72AotOv6Ewr7@xemu.demon.co.uk>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!sn-xit-01!supernews.com!feeder.qis.net!dispose.news.demon.net!news.demon.co.uk!demon!xemu.demon.co.uk!dave
References: <3abbda8f_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,634447406d21cfca
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-24 17:00:06 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!sn-xit-01!supernews.com!feeder.qis.net!dispose.news.demon.net!news.demon.co.uk!demon!xemu.demon.co.uk!dave
From: Dave Bird <dave@xemu.demon.co.uk>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: extending interfaces and final variables in inner classes
Date: Sat, 24 Mar 2001 18:46:00 +0000
Organization: none
Message-ID: <B5NC72AotOv6Ewr7@xemu.demon.co.uk>
References: <3abbda8f_2@dnews>
NNTP-Posting-Host: xemu.demon.co.uk
X-NNTP-Posting-Host: xemu.demon.co.uk:158.152.196.209
X-Trace: news.demon.co.uk 985481747 nnrp-13:1780 NO-IDENT xemu.demon.co.uk:158.152.196.209
X-Complaints-To: abuse@demon.net
MIME-Version: 1.0
X-Newsreader: Turnpike Integrated Version 5.00 U <dQumtnY$x4rJ2u5tL5fS$n2vuP>
Lines: 45