title: JOptionPane.showInputDialog cannot find symbol
body: <p>I've tried my best to research this myself, but cannot get anywhere - I keep getting the same errors. I'm compiling from terminal with the javac command, and get the errors -</p>
  
  <pre><code>javaJOptionPane.java:1: JOptionPane is already defined in this compilation unit
  import javax.swing.JOptionPane;
  ^
  javaJOptionPane.java:7: cannot find symbol
  symbol  : method showInputDialog(java.lang.String)
  location: class JOptionPane
          String input = JOptionPane.showInputDialog("Enter Input");
                                ^
  2 errors
  </code></pre>
  
  <p>for this code -</p>
  
  <pre><code>import javax.swing.JOptionPane;
  
  class JOptionPane
  {
      public static void main()
      {
          String input = JOptionPane.showInputDialog("Enter Input");
          System.out.println(input);
      }
  }
  </code></pre>
  
  <p>Using the command "javac filename.java". Sorry if this has already been answered; I can't find it, and am rather stuck! </p>