title: Reading of input of text file into arrays
body: <p>I have a input txt file which is of format</p>
  <pre><code>T1, 4, 8
  T2, 1, 40
  T3, 2, 9
  T4, 3, 15
  </code></pre>
  <p>How to store the values of that text file that are split by commas in an array?</p>
  <p>In commented code, the error I get is <code>Type mismatch: cannot convert from String to int</code></p>
  <pre><code>import java.util.Scanner;
  import java.io.*;
  
  public class FCFS {
  
      public static void main(String args[]) throws IOException {
          String process_name[], tmp[];
          int tat[], wt[];
          int priority[];
          int burst_time[];
          int i = 0, avg_tat = 0, avg_wt = 0;
          String line = null;
  
          try {
              Scanner Keyboard = new Scanner(System.in);
              System.out.print(&quot;Enter the file name &quot;);
              String fileName = Keyboard.nextLine()
              FileReader file = new FileReader(fileName);
              BufferedReader myReader = new BufferedReader(file);
              while ((line = myReader.readLine()) != null) {
  
                  // process_name[i] = line.split(&quot;,&quot;)[0];
                  //priority  [i] = line.split(&quot;,&quot;)[1];
  
                  //burst_time  [i] = line.split(&quot;,&quot;)[2];
                  i++;
              }
          } catch (FileNotFoundException e) {
              System.out.println(&quot;An error occurred.&quot;);
              e.printStackTrace();
          }
  
  
      }
  </code></pre>