title: Beginner - Open a method from another class
body: <p>I'm a bit confused.</p>
  
  <p>I have two java files, one is ApplicationXXX.java (Main) and another readInput.java. Now my aim is it to execute the method from readInput in the main class. I know the way with an instance like:</p>
  
  <pre><code>readInput read = new readInput();
  </code></pre>
  
  <p>with that I can only access on the values of the method, but the Method includes also input fields, im gonna short the content from readInput, because it includes alot of plausibility checks. On the first time I just want open the method to read in the values, without giving any variable back. Im importing also the package in the ApplicationXXX.java.  </p>
  
  <pre><code>package application.test;
  
  import java.io.bufferedeader;
  
      public class readInput {
  
      public String var1;
      public String var2;
  
      public readInput();
  
      BufferedReader input = new BufferedReader(new InputStreamReader(
      System.in));
  
      System.out.println("Enter Var 1:");
      this.var1 = input.readLine();
  
      System.out.println("Enter Var 2:");
      this.var2 = input.readLine();
  
      }
      }
  </code></pre>
  
  <p>Would be great, when someone can help me.
  When you need further informations, just comment it. </p>