title: Take multiple inputs from text files in java
body: <p>I write a program and need to generate results for different input (integer) values. which i have to read some integer numbers from several text files and store them in these variables. </p>
  
  <ul>
  <li>choice </li>
  <li>numofNodes</li>
  <li>numofPoints</li>
  </ul>
  
  <p>in each file there might be multiple numbers that should be assigned to one of above variables, for example:</p>
  
  <p>First text file contains five values for first variables and other two variables have one value on separate lines like below:</p>
  
  <pre><code>1 2 3 4 5
  60
  50
  </code></pre>
  
  <p>Second text file contains five values for second variables and other two variables have one value on separate lines like below:</p>
  
  <pre><code>1 
  40 50 60 70 80
  50
  </code></pre>
  
  <p>and so on..</p>
  
  <p>I have no idea how to read them from text files.
  any helps will be appreciated.</p>
  
  <p>Here's my Main class:</p>
  
  <pre><code>public static void main(String[] args)throws InterruptedException {
  
      // how to read numbers from different text files here
      // and store them in these variables to call func method?
      // int choice = ? 
      // int numofNode = ?
      // int numofPoint = ?
  
      path ob=new path(choice,numofNode,numofPoint);
      ob.func();
  
  }
  </code></pre>