Donate Share

Java Generic Algorithms

Subscribe

Checked exceptions on subclasses functors

  1. 2009-10-16 06:41:39 UTC

    Is there a way to implement checked exceptions on the subclassed version of a functor? The abstract fn method does not throw any checked exceptions so I think I'm stuck with throwing unchecked exceptions from the fn method.

  2. 2009-10-21 03:25:53 UTC

    no -- java does not allow a derived class to add checked exceptions to an overridden method. Unfortunately, you are stuck with unchecked exceptions.

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.