question on the output of a java snippet
<p>The following snippet gives output as </p>

<blockquote>
  <p>Sup.field=0, Sup.getField()=1</p>
</blockquote>

<p>I do not understand why Sup.getField() does not get 0 instead?</p>

<pre><code>class Super {
   public int field = 0;
   public int getField(){return field;}
}

class Sub extends Super {
   public int field  = 1;
   public int getField() {return field;}
   public int get SuperField() { return  super.field;}  
}

public class FieldAccess{
   public static void main(String[] args){
   Super Sup = new Sub();
   System.out.println("Sup.field ="+Sup.field + ",Sup.getField()"+Sup.getField());
  }
}
</code></pre>
