Handle interface error

How Handle error if interface A,B are extended in class C. If class C using one function that is in A Interface if any error occurs in function how do you handle it?

Questions by ramjanehari

Showing Answers 1 - 6 of 6 Answers

chetal

  • Mar 17th, 2009
 

Interfaces can have function body. If the body of the function is provided you can handle the exception in the function in interface A using try catch statements.
OR
Handle the exception in class C where the function of interface A is called using try catch.
OR
use throws clause in class defination of C or function defination in A.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions