Click here to Skip to main content
15,909,590 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.
I need somebody to explain to me in detail how this code handle the exceptions and how we call the exception through a method?

Java
class SubException extends Exception { }
 class SubSubException extends SubException { }

 public class CC { void doStuff() throws SubException { } }

 class CC2 extends CC { void doStuff() throws SubSubException { } }
 class CC3 extends CC { void doStuff() throws Exception { } }

 class CC4 extends CC { void doStuff(int x) throws Exception { } }

 class CC5 extends CC { void doStuff() { } }

and can throw exception to override method ?
Thanks.
Posted
Updated 29-Nov-11 19:49pm
v3
Comments
Selva K 30-Nov-11 4:53am    
we have to use catch() to catch the thrown errors

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900