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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a numeric digit?

1046


Explain the access modifiers for a class, method and variables?

1104


Is java an open source?

934


What does || mean in vectors?

899


Can you make a constructor final in Java?

1079


What are the access modifiers in java?

1000


What is ascii format?

952


Explain about wait() method?

989


What is the difference between final, finally and finalize()?

1080


What is return type in java?

1020


What is stringjoiner ?

918


How can you read content from file in java?

971


Can we use a switch statement with strings?

992


What is the difference between a synchronized method and a synchronized block?

1035


What is widening and narrowing in java? Discuss with an example.

1000