title: Any one Explain the output below java programme?
body: <p>Why does folowing program produce output 0 according to my knowledge output has to be 100</p>
  <pre><code>  class A{
             int value=100;
      public void printValue(){
      System.out.println(&quot;Value from A : &quot;+value);
      }
      A(){
          printValue();
       }
      }
      class B extends A{
      int value=200;
       public void printValue(){
          System.out.println(&quot;Value from B : &quot;+value);
       }
      }
      class Demo{ 
          public static void main(String args[]){  
          new B();
       }   
      }
  </code></pre>
  <p>The output is followings:
  Value from B : 0</p>