Explain the output of this Inheritance Java program?
<p>Guys can you please explain to me how come the output of this example is:</p>

<pre><code>  Exam1
  This is Tennis Shoes
  derived class
  This is a white Tennis Shoes is created
</code></pre>

<p>If you could explain to me what exactly happened after we created an Object of <code>White Tennis Shoes</code> and what happened.
Please guys don't tell me do your homework or something I'm just preparing for my exam and I this is an old question.</p>

<p>The code is below:</p>

<pre><code>class Shoes{
    public Shoes(){
        this("you have created a shoes Object");
        System.out.println("This is the base class");
    }

    public Shoes(String s){
        System.out.println(s);
    }
}

class TennisShoes extends Shoes{
    public TennisShoes(){
        this("This is Tennis Shoes");
        System.out.println("derived class");
    }

    public TennisShoes(String s){
        super("Exam1");
        System.out.println(s);
    }
}

class WhiteTennisShoes extends TennisShoes{
    public WhiteTennisShoes(String s){
        System.out.println(s);
    }
}

class ConstructorPrintingTester{
    public static void main(String[] args){
        WhiteTennisShoes shoesObj;
        shoesObj = new WhiteTennisShoes("This is a white Tennis Shoes is created");
    }
}
</code></pre>
