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


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

Re: "implements" does not mean "implements"

From Daniel Pitts <usenet@coloraura.com>
Newsgroups comp.lang.java.programmer
Subject Re: "implements" does not mean "implements"
Date 2016-11-10 09:02 -0800
Organization A noiseless patient Spider
Message-ID <o02971$lic$1@dont-email.me> (permalink)
References <implements-20161110014035@ram.dialup.fu-berlin.de>

Show all headers | 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


Thread

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

csiph-web