Re: acces of members of subclass
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Mon, 28 Jul 2008 12:58:24 -0700 (PDT)
Lew wrote:
The call to super() is *always* present. Any given class, in the
general case, can rely on the presence of super() call. Daniel and
you are not correct.
Eric Sosman <Eric.Sos...@xxxxxxx> wrote:
No, Mark is right, and Daniel and Lew are wrong.
I said that there was a call. I never claimed that it would always
succeed.
Lew (and the JLS) are right in saying that the compiler inserts a
call to super() if the constructor does not begin with a call to one
How can I be wrong if I said the same thing that the JLS does?
of its superclass' constructors. But that does not guarantee that the
superclass actually *has* a no-arguments constructor that can be called
as plain super(). If it doesn't, there'll be a compile-time error.
I never said otherwise.
Try it!
The error that results proves that I was correct. There cannot be an
error on a call to super() unless there's a call to super() to have an
error.
--
Lew
.
- Follow-Ups:
- Re: acces of members of subclass
- From: Eric Sosman
- Re: acces of members of subclass
- References:
- [General]acces of members of subclass
- From: Daniel Moyne
- Re: [General]acces of members of subclass
- From: RedGrittyBrick
- Re: [General]acces of members of subclass
- From: Lew
- Re: [General]acces of members of subclass
- From: Daniel Moyne
- Re: [General]acces of members of subclass
- From: Lew
- Re: [General]acces of members of subclass
- From: Daniel Moyne
- Re: [General]acces of members of subclass
- From: Lew
- Re: [General]acces of members of subclass
- From: Mark Space
- Re: acces of members of subclass
- From: Lew
- Re: acces of members of subclass
- From: Eric Sosman
- [General]acces of members of subclass
- Prev by Date: Re: acces of members of subclass
- Next by Date: Re: acces of members of subclass
- Previous by thread: Re: acces of members of subclass
- Next by thread: Re: acces of members of subclass
- Index(es):
Relevant Pages
|