title: Runtime Error in Java code "Exception in thread "main" java.lang.NumberFormatException: For input string: "
body: <p>I am facing this runtime error <code>**"Exception in thread "main" java.lang.NumberFormatException: For input string: "" "**</code> Please help me out to overcome this. </p>
  
  <p>Here is the code snipet :</p>
  
  <pre><code>package SampleC;
  import java.io.File;
  import java.io.IOException;
  import java.util. *;
  
  
  import jxl.*;
  import jxl.read.biff.BiffException;
  
  
  import jxl.write.WriteException;
  
  import java.util.ArrayList;
  import java.util.Vector;
  
  public class Test {
      public static void main(String args[])throws IOException, BiffException, WriteException {
      {
          try
          {
          Workbook workbook=Workbook.getWorkbook(new File("C:\\Documents and Settings\\snandam\\Desktop\\readvalues.xls"));
  
           Sheet sheet =workbook.getSheet(0);
      // String[] s=new String[200];
           int[] s = new int [200];
           Cell[][] cell=new Cell[100][100];
  
           ArrayList&lt;Integer&gt; myList = new ArrayList&lt;Integer&gt;();
           {
  
  
           for(int i=0;i&lt;sheet.getColumns();i++)
           {
               for(int j=0;j&lt;sheet.getRows(); j++)
               {
               cell[i][j] = sheet.getCell(i, j);
  
               s[i]=Integer.parseInt(cell[i][j].getContents());
  
             //  System.out.printf("%s\n", s[i]);
               Collections.addAll(myList, s[i]); 
  
  
               } 
  
  
  
        }
  
  
        ArrayList&lt;Integer&gt; a1 = new ArrayList&lt;Integer&gt;();
        a1.add(3);a1.add(-3);a1.add(-8);a1.add(0);
  
        ArrayList&lt;Integer&gt; a2 = new ArrayList&lt;Integer&gt;();
        a2.add(-1);a2.add(-4);a2.add(-7);a2.add(6);
  
        ArrayList&lt;Integer&gt; a3 = new ArrayList&lt;Integer&gt;();
        a3.add(1);a3.add(5);a3.add(6);a3.add(7);
  
        ArrayList&lt;Integer&gt; a4 = new ArrayList&lt;Integer&gt;();
        a4.add(-10);a4.add(-4);a4.add(-1);a4.add(3);a4.add(8);
  
        ArrayList&lt;Integer&gt; a5 = new ArrayList&lt;Integer&gt;();
        a5.add(17);a5.add(18);a5.add(19);a5.add(20);a5.add(21);a5.add(22);a5.add(23);a5.add(24);
  
        int target = 0;
  
        Vector&lt;ArrayList&lt;Integer&gt;&gt; vecOfLst   = new Vector&lt;ArrayList&lt;Integer&gt;&gt;();
        vecOfLst.add(myList);
        vecOfLst.add(a1);
        vecOfLst.add(a2);
        GlobalMembers gMem    = new GlobalMembers();
        gMem.findtarget(target, vecOfLst, 3);
        vecOfLst.add(a3);
        vecOfLst.add(a4);
        vecOfLst.add(a5);
        gMem.findtarget(target, vecOfLst, 6);
      }
  } catch (BiffException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }  
  
          }
      }
  }
  </code></pre>