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


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

Re: Overwriting inner classes?

From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: Overwriting inner classes?
Date 2013-05-30 10:41 -0700
Organization A noiseless patient Spider
Message-ID <ko82o0$i8l$1@dont-email.me> (permalink)
References <overwriting-20130530055916@ram.dialup.fu-berlin.de>

Show all headers | View raw


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.

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


Thread

Re: Overwriting inner classes? markspace <markspace@nospam.nospam> - 2013-05-30 10:41 -0700

csiph-web