title: How to parse Integers from File in Java?
body: <p>I have integers in a text file <code>n.txt</code> in the format, 2 columns of integers and the columns are separated by an empty space.</p>
  
  <p>I want to read these integers and escape the space in between and input these two integers in 2 separate integers. The below code is used for parsing the <code>String</code> obtained. I wanted to know if there are any <code>String</code> methods instead with which I can split the <code>String</code> into to separate arrays and use empty space as a delimiter ?</p>
  
  <pre><code>String URL="C:\\User\\Nimit\\Desktop\\n.txt";
  File f = new File(URL);
  FileReader inputF = new FileReader(f);
  BufferedReader in = new BufferedReader(inputF);
  
  int[] a= new int [1000];
  int[] b= new int [1000];
  
  String s =in.readLine();
  
  while(s!=null)
  {
      int i = 0;
      a[i] = Integer.parseInt(s,b[i]); //this is line 19
  
      //*not important*// System.out.println(a[i]);
      s = in.readLine(); 
  }
  
  in.close();
  
  System.out.println("the output of the file is " +f);
  </code></pre>