*
The moose likes Beginning Java and the fly likes Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exceptions" Watch "Exceptions" New topic
Author

Exceptions

Ahmer SSAT-OB
Greenhorn

Joined: Feb 06, 2002
Posts: 1
1) Can we declare any Exception class STATIC.
2) How can I use return and throw in the same method.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Ahmer

1) Can we declare any Exception class STATIC.


The only way to define any class as a static class is to make it a nested class. When you make a nested class static however, it is the same as creating a new top level class. Why do want to make an Exception class static?

2) How can I use return and throw in the same method.

If you have a method that can throw an exception you can do this:

hope that helps


Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exceptions
 
Similar Threads
Can the color for the disabled item be changed
WA #1.....word association
Private methods
URGENT - NEED HELP - Block Code
error in Marcus Green 2.