Search:

Type: Posts; User: andreas90

Search: Search took 0.07 seconds.

  1. Replies
    5
    Views
    1,458

    Re: Exception problem...plzz help

    I'm not sure what is your exact question. As you said derived class may or may not throw. Therefore because of the *may throw*, main should declare or catch the exception. If you are asking why an...
  2. Replies
    5
    Views
    1,458

    Re: Exception problem...plzz help

    As the error message says java.lang.Exception, must be caught or declared to be thrown.
    You should either declare it by adding a throws clause in your main like you do in your disp() method or catch...
  3. Replies
    5
    Views
    1,458

    Re: Exception problem...plzz help

    Hello Arati2512!
    I tried your code and it runs without any error. Are you sure this is the code that is causing the error?
Results 1 to 3 of 3