本帖最后由 fireonice7 于 2009-10-24 16:34:47 编辑

解决方案 »

  1.   

    t.regist( );这个为什么不传参数进去?
      

  2.   

    传了也报错:Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    Unhandled exception type MyException at RegistStudent.main(RegistStudent.java:23)
      

  3.   

    public static void main(String[] args) throws Exception
      {
       RegistStudent t=new RegistStudent();
       t.regist(3);/*若加入此步系统报错:Exception in thread "main" java.lang.Error: Unresolved compilation    problem: The method regist(int) in the type RegistStudent is not applicable for the arguments ()at RegistStudent.main(RegistStudent.java:23)*/
       t.manager();
       }
    改成这样,一你没有传参,而传参后你没有处理异常,要么扔给控制台,要么catch掉
      

  4.   

      public static void main(String[] args) throws MyException