title: Exception in thread "main" java.lang.NumberFormatException: null
body: <p>I have tried everything I possibly could with this, but I still could not find any solution to this, and here is the error, I tried to change the null in line 16, etc but to no avail, and I'm a new Java programmer so I do not have much experience using this language, all help appreciated!</p>
  
  <p>Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:454) at java.lang.Integer.parseInt(Integer.java:527) at DebugEight4.main(DebugEight4.java:11)</p>
  
  <pre><code>import javax.swing.*;
  public class DebugEight4
  {
   public static void main(String[] args) 
  {
    int x = 0, y;
    String array[] = new String[100];
    String entry;
    int i = Integer.parseInt(array[1]);
    final String STOP = "XXX";
    StringBuffer message = new
        StringBuffer("The words in reverse order are\n");
  
    entry = JOptionPane.showInputDialog(null,
      "Enter any word\n" +
      "Enter " + STOP + " when you want to stop"); 
    while(!(entry.equals(STOP)))
    {
       array[x] = entry;
       x++;
       entry = JOptionPane.showInputDialog(null,
          "Enter another word\n" +
          "Enter " + x + " when you want to stop"); 
    }
    for(y = 0; y &gt; 0; ++y)
    {
       message.append(array[y]);
       message.append("\n");
    }
    JOptionPane.showMessageDialog(null, message);
   }
  }
  </code></pre>