Java code explanation
<pre><code>class Base 
{
    int i = 99;
    public void amethod()
    {
        System.out.println("Base.amethod()");
    }

    Base()
    {
        amethod();
    }
}
public class Derived extends Base
{
    int i = -1;

    public static void main(String argv[])
    {
        Base b = new Derived();
        System.out.println(b.i);
        b.amethod();
    }

    public void amethod()
    {
        System.out.println("Derived.amethod()");
    }
}
</code></pre>

<p>Why does this code print <code>b.i = 99</code> and not <code>b.i = -1</code>?
Thank you.</p>
