commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject RE: [httpclient][patch] StatusLine encapsulation
Date Wed, 04 Sep 2002 23:36:14 GMT
Ryan Lubke <Ryan.Lubke@sun.com> wrote on 04/09/2002 11:40:09 PM:

> On Wed, 2002-09-04 at 09:36, Jeff Dever wrote:
> > What you say is true Ryan, but the question is "if I write a 
constructor, is
> > super() called implicitly in that constructor?"  I don't know the 
answer to
> > this.
> 
> My point was that I don't believe super() will be added to all
> constructors by default as Ortwin seemed to imply.  My point was what
> you write is what you get in the case of declared constructors.
Well, your beliefs need changing :) If you don't call a constructor as the 
first executable line of code in a constructor, the compiler adds one in 
for you: super()

> It wouldn't make sense to always add a super() call implicitly to each
> constructor.  If the super class doesn't have a no arg constructor, then
> you're dead in the water.
And this will happen if you don't call the appropriate constructor 
yourself. You'll get a compile error on a call to super() that's not in 
the code.

--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers




--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message