wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes About using Application Exceptions in a Project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "About using Application Exceptions in a Project" Watch "About using Application Exceptions in a Project" New topic
Author

About using Application Exceptions in a Project

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


Hi ,

My appolizes if it is not the right forum .

Please let me know this :

whenever we need to define any Application Exceptions we just do like this :

For Example if there is InsufficientBalanaceException like this .

public class InsufficientBalanaceException extends Exception
{
InsufficientBalanaceException ()
{
}
}

But please let me know whether these ApplicationExceptions will be Exception or RuntimeException.
sorry if is a dumb question .

Save India From Corruption - Anna Hazare.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


I am sorry .Its a dumb question actually .
Rituraj Jain
Ranch Hand

Joined: Nov 28, 2008
Posts: 37
i think it will be a compile time exception...compiler will flag it...........why don't you subclass RuntimeException class if you want an run time exception

read this article Read It


Rituraj Jain
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38481
    
  23
The hardest part of creating Exceptions is deciding which other class it ought to extend.

You usually need to overload the constructor when subclassing Exceptions. In 99% of occasions, you need do nothing else.
 
 
subject: About using Application Exceptions in a Project