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


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

Re: Object orientation question

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Object orientation question
Date 2014-10-29 08:35 +0100
Message-ID <cbbjmvFjvvcU2@mid.individual.net> (permalink)
References <0b94f856-9631-48ee-8d2d-94055d79cfd6@googlegroups.com> <m2mb82$cef$1@dont-email.me> <cb80jkFmoa9U1@mid.individual.net> <slrnm4upel.fp3.avl@login.logic.tuwien.ac.at>

Show all headers | View raw


On 28.10.2014 10:45, Andreas Leitgeb wrote:
> Robert Klemme <shortcutter@googlemail.com> wrote:
>> On 27.10.2014 21:51, Eric Sosman wrote:
>>>       Clearly, the generated code is the same: AdditionInterface extends
>>> BaseInterface, therefore any class implementing AdditionInterface also
>>> necessarily implements BaseInterface.  If the class fails to provide a
>>> method specified by BaseInterface, the code won't compile.  So the
>>> question is purely about readability and style.
>> This is not fully correct: if you check with reflection you will see
>> that there is a difference in what Class.getInterfaces() returns.
>
> You don't even need reflection to notice a difference:
>
> interface A { ... }               |  interface A { ... }
> interface B { ... }               |  interface B extends A { ... }
> class C implements A,B { ... }    |  class C implements B { ... }

That is not the situation I was referring to.  In both _my_ cases B 
extends A.  The difference is just in the declaration what C implements.

Cheers

	robert

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Object orientation question mike <mikaelpetterson@hotmail.com> - 2014-10-27 13:26 -0700
  Re: Object orientation question Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-10-27 16:51 -0400
    Re: Object orientation question Robert Klemme <shortcutter@googlemail.com> - 2014-10-27 23:51 +0100
      Re: Object orientation question Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-10-28 09:45 +0000
        Re: Object orientation question Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-10-28 08:29 -0400
          Re: Object orientation question Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-10-28 08:33 -0400
            Re: Object orientation question Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-10-28 16:26 +0000
        Re: Object orientation question Robert Klemme <shortcutter@googlemail.com> - 2014-10-29 08:35 +0100
          Re: Object orientation question Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-10-30 00:32 +0000

csiph-web