Hi,

The error is an compilation error is not execution error, and the compiler
(JBuilder4) shows me only the following compilation error:

    Error #: 360 : unreported exception: java.lang.Exception; must be caught or
declared to be thrown at line 32, column 28

The class has this form, with a constructor who throws an exception:

   public MyClass
   {
            MyClass(String str, int type) throws Exception {};
            public int  myMethod(int i) {return i;};
    }

When I try to override the method myMethod:

    oneclass=new MyClass("Test", 1)
        {
            public int myMethod(int i) {return i++; }
        }

Seems to be that is not possible to override a method when the constructor
throws an exception.
I have already tried to make try-catch when creating this inner class, but it
doesn' work,

David

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to