Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the need of "creating and throwing an
UserdefinedException" when the "Exception" class is already
available?

Answers were Sorted based on User's Feedback



What is the need of "creating and throwing an UserdefinedException" when the "Except..

Answer / vinayakkatkar

There are some exceptions that are not defined by java api
ex- invalid age exception ,invalid number exception etc.

in user defined exceptions are raised by programmer,
thrown by programmer ,handled by programmer

while predefined exceptions are raised by system,
thrown by system
handled by programmer

Is This Answer Correct ?    2 Yes 0 No

What is the need of "creating and throwing an UserdefinedException" when the "Except..

Answer / sri

if you want you could specify your own exception that you
know is gonna happen otherwise it is recommended to handle
the exception through exception class in catch block.

Is This Answer Correct ?    1 Yes 0 No

What is the need of "creating and throwing an UserdefinedException" when the "Except..

Answer / guru

user defined exception is used throwing out(user) own
exception..

Is This Answer Correct ?    0 Yes 0 No

What is the need of "creating and throwing an UserdefinedException" when the "Except..

Answer / seshadri pera

UserDefindException are thrown and handled based on the
user requirements to make sure the particular exception
conditions intead of throwing the general exception for all
the exceptions.

We should handle the specific exception first by using
catching it instead of handling generic exceptions of type
Exception.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Why is the main method declared static?

0 Answers  


what is the difference between the "protected and default" modifiers?

8 Answers  


Is java still relevant?

0 Answers  


What is static synchronization?

0 Answers  


What is protected in java?

0 Answers  


How many boolean functions are there?

0 Answers  


What is n in java?

0 Answers  


what is hashmap& hashtable with example?

1 Answers   CTS,


What is meant by interface?

0 Answers  


What are the classes of java?

0 Answers  


can we override the main() method in java????

3 Answers   Vimukti Technologies,


What are meta-annotations?

0 Answers   Cyient,


Categories