File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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