| Author |
Checked Exception in static method
|
rahul deo
Greenhorn
Joined: Jul 05, 2011
Posts: 10
|
|
Hi All
Can we throw a checked exception in a static method? I am confused , because till now i know that We can throws only a runtime exception. So if we can throw a checked exception then why and how? Thanks in advance
|
 |
Rajdeep Biswas
Ranch Hand
Joined: Mar 26, 2012
Posts: 163
|
|
|
I'd recommend you to try to do so. Compiler will let you know, else you can see the behavior during execution. Then you can post here what you found!
|
The biggest gamble will be to ask a question whose answer you know in that it will challenge your theory | www.TechAspire.blogspot.in
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Sure you can. It makes no difference whether the method is static or not, the same rules apply in both cases.
|
 |
 |
|
|
subject: Checked Exception in static method
|
|
|