title: how to feed input from child class to parent class in java?
body: <p>Ex</p>
  
  <pre><code>class A () {
  
    class A(int a, int b) {
    }
  
  }
  
  class B extends A {
  
     int m;
     int n;
  
     class B()
     {
        getInput(); // i wanna invoke this method first before calling super(). But it does not allow in Java. How to work around this ?
        super(m,n);
     }
  
     public void getInput() {
          Scanner scanner = new Scanner(System.in);
          m = scanner.nextInt();
          n = scanner.nextInt();
     }
  
     public static void main () {
        B b = new B();
     }
  }
  </code></pre>