Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35889 > unrolled thread

Re: "implements" does not mean "implements"

Started byDaniel Pitts <usenet@coloraura.com>
First post2016-11-10 09:02 -0800
Last post2016-11-10 09:02 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "implements" does not mean "implements" Daniel Pitts <usenet@coloraura.com> - 2016-11-10 09:02 -0800

#35889 — Re: "implements" does not mean "implements"

FromDaniel Pitts <usenet@coloraura.com>
Date2016-11-10 09:02 -0800
SubjectRe: "implements" does not mean "implements"
Message-ID<o02971$lic$1@dont-email.me>
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();

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web