title: How i can Read adjMatrix graph from inp text
body: <p>I was trying to read adjMatrix graph from text it only read first line  but I encounter this error. Is there any suggestion please ?</p>
  
  <pre><code>java.lang.NumberFormatException: For input string: "0 1 1 1"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:580)
      at java.lang.Integer.parseInt(Integer.java:615)
  </code></pre>
  
  <p></p>
  
  <pre><code> public static void main(String[] args)throws IOException {
          int row_num = 0;
         //InputGraph gr = new InputGraph("input.txt");
       //  Cells w= gr.copyMatrix();
       //   w.printAdjMatrix();
  
  
          try {
  
              String fileName = ("input.txt");
              File file = new File(fileName);
  
              BufferedReader br = new BufferedReader(new FileReader(file));
  
              //get number of vertices from first line
  
              String  line = br.readLine();
              System.out.println("hi");
  
              //InputGraph.size = Integer.parseInt(line.trim());
              InputGraph.size=Integer.parseInt(line);
              InputGraph.adMatrix = new int[InputGraph.size][InputGraph.size];
              br.readLine();
  
              for (int i = 0; i &lt; InputGraph.size; i++) {
  
                  line = br.readLine();
                  String[] strArry = line.split(" ");
                  for (int j = 0; j &lt; InputGraph.size; j++) {
                      InputGraph.adMatrix[i][j] = Integer.parseInt(strArry[j]);
                      if (Integer.parseInt(strArry[j]) == 1)
                          row_num++;
  
                  }
              }
  
  
          } catch (Exception e4) {
              e4.printStackTrace();
          }
  </code></pre>
  
  <p>input text file</p>
  
  <pre><code>0 1 1 1
  0 0 0 0
  1 1 0 1
  0 1 0 0
  </code></pre>