title: Cannot find symbol
body: <p>I'm getting the following java compiler errors:</p>
  
  <pre><code>main.java:9: cannot find symbol
  symbol  : method parseInt(int)
  location: class java.lang.Integer
          int count = Integer.parseInt(getPennies());
                             ^
  main.java:23: incompatible types
  found   : java.lang.String
  required: int
              JOptionPane.showInputDialog("How many pennies do you have?");
                                         ^
  </code></pre>
  
  <p>2 errors</p>
  
  <p>Here is my code</p>
  
  <pre><code>import javax.swing.*;
  
  class main {
  
  public static void main(String args[]) {
  
      try {
  
          int count = Integer.parseInt(getPennies());
          System.out.println("You have "+count+" pennies");
  
      } catch (NumberFormatException exception) {
  
          System.out.println("Please insert a number");
          getPennies();
      }
  }
  
  
  public static int getPennies() {
  
      int input = 
              JOptionPane.showInputDialog("How many pennies do you have?");
  
      return input;
  }
  }
  </code></pre>
  
  <p>Any idea why I am getting these errors?</p>