title: how to modify parent class variable with the child class and use in another child class in java
body: <p>I have a class Test which has a variable count as 0.
  Test class was extended by Classes A and B.
  I set the count in A as 50.
  Now i want to access the count in B, which should return the value as 50, But i'm getting as 0 in B.
  I'm new to java and i dont know how it works :(
  can any one help me how to implement this? :(</p>
  
  <pre><code>Public Class Extend { 
      public int count =0; 
  } 
  
  
  Public class a extends Extend { 
      this.count = 50; 
   }  
  
  public class b extends Extend { 
     system.out.println ( " count is " + count); 
  } 
  </code></pre>