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


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

Re: Overwriting inner classes?

Started bymarkspace <markspace@nospam.nospam>
First post2013-05-30 10:41 -0700
Last post2013-05-30 10:41 -0700
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: Overwriting inner classes? markspace <markspace@nospam.nospam> - 2013-05-30 10:41 -0700

#24199 — Re: Overwriting inner classes?

Frommarkspace <markspace@nospam.nospam>
Date2013-05-30 10:41 -0700
SubjectRe: Overwriting inner classes?
Message-ID<ko82o0$i8l$1@dont-email.me>
On 5/29/2013 9:00 PM, Stefan Ram wrote:
> Supersedes: <overwriting-20130530031632@ram.dialup.fu-berlin.de>
> [I->It]
>
>    class A { static class B { void f(){} }}
>    class C extends A {}
>
>    It never occured to me before, but, yes:
>    Can C somehow »overwrite« f?
>


What Barb said.  C cannot even overload f.  They are simply completely 
disjoint.

This would be different:

class D extends B {}

But then obviously the normal rules apply.  This is one thing I like 
about Java over C++:  the polymorphism rules are fairly simple and easy 
to remember.  C++ is a lot more baroque;  I find it quite difficult 
actually.

[toc] | [standalone]


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


csiph-web