commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ortwin Gl├╝ck" <>
Subject Re: [httpclient][patch] StatusLine encapsulation
Date Wed, 04 Sep 2002 14:19:20 GMT
Believe it or not but run the following code:

public class Super {

     public Super() {


public class Test extends Super {

     public Test(int a) {

     public static void main(String[] args) {
         Test test1 = new Test(3);

The output is:


So super() is definitely called implicitely from Test(int). This is even 
the case if Super is declared abstract. It is also the reason why you 
can not declare a superclass' no-arg constructor as private.

This is just to clarify things


Ryan Lubke wrote:
> My point was that I don't believe super() will be added to all
> constructors by default as Ortwin seemed to imply.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message