Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35889
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Daniel Pitts <usenet@coloraura.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: "implements" does not mean "implements" |
| Date | Thu, 10 Nov 2016 09:02:55 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <o02971$lic$1@dont-email.me> (permalink) |
| References | <implements-20161110014035@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Thu, 10 Nov 2016 17:02:26 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="78267a496899f1f82967c6641e46249a"; logging-data="22092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182w3idWZzMEJl0aPd+MXJSloZEsRi1Pdo=" |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
| In-Reply-To | <implements-20161110014035@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:UgtW8FwuvDTWUw4E/kRZVEygFes= |
| Xref | csiph.com comp.lang.java.programmer:35889 |
Show key headers only | View raw
On 11/9/16 4:45 PM, Stefan Ram wrote:
> Just a small thought I had on the train today:
>
> "implements" does not always mean "implements".
>
> For example, this compiles:
>
> interface A { void m(); }
>
> abstract class C implements A { public abstract void m(); }
>
> public final class Main
> { public static void main( final java.lang.String args[] )
> { java.lang.System.out.println( "2016-11-10" ); }}
>
> C does not implement A, yet is says »C implements A«.
>
> The program compiles and prints
>
> 2016-11-10
>
> .
>
Sure it does, it tells the compiler that any time you have an Object of
type C, it implements interface A. This is true, since any concrete
subclass of C would need to implement void m();
Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread
Re: "implements" does not mean "implements" Daniel Pitts <usenet@coloraura.com> - 2016-11-10 09:02 -0800
csiph-web