本人刚刚开始学习java 刚刚编译一个运算平方的程序 却总是出现错误  我把程序发出来,  大家看看 哪里错了啊!  帮忙 指出来  小弟在这里谢过了!
import javax.swing.JOptionPane;
public class Square
 {
  public static void main(String args[])
   {
    String s=JOptionPane,showlnputDialog( "输入一个整数:" );
    int n=lnteger.parselnt(s);
    int nn=n*n;
      JOptionPane.showMessageDialog(
        null,
        s+"的平方为:"+nn,"标题:平方",
        JOptionPanePLAN_MESSAGE);
     System.exit(0);
   }
}

解决方案 »

  1.   

    哪来的代码, 这么多语法错误
    class Square {
      public static void main(String args[]) {
        String s = JOptionPane.showInputDialog("输入一个整数:");
        int n = Integer.parseInt(s);
        int nn = n * n;
        JOptionPane.showMessageDialog(
            null,
            s + "的平方为:" + nn, "标题:平方",
            JOptionPane.PLAIN_MESSAGE);
        System.exit(0);
      }
    }
      

  2.   

    单词拼错了,或者是大小写没写对,哎,真的惨不忍睹
    给个好的你看看
    import javax.swing.JOptionPane;
    public class Test { public static void main(String[] args) {
       String s=JOptionPane.showInputDialog( "输入一个整数:" );
        int n=Integer.parseInt(s);
        int nn=n*n;
          JOptionPane.showMessageDialog(
            null,
            s+"的平方为:"+nn,"标题:平方",
            JOptionPane.PLAIN_MESSAGE);
         System.exit(0);
    }
    }