title: Child class doesn't see parent variable
body: <pre><code>public class Program {
  
      public static void main(String[] args) {
          Listener listener = new Listener();
          listener.listen();
      }
  }
  
  public class Listener {
  
      ServerQuery query;
      int test = 1;
  
      public listen() {
          query = new ServerQuery();
          Channel ch = new Channel();
          ch.dupa();
      }
  }
  
  public class Channel extends Listener {
  
      public dupa() {
          System.out.print(test); // works fine 
          super.query.doSomething(); // null pointer
          query.doSomething(); //  null pointer
      }
  }
  </code></pre>
  
  <p>I cant access variable "query" in class "Channel". 
  Can anyone explain me why ?</p>