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
What is a data structure java?
What is a class reference?
What are parsing rules?
How does remove work in java?
hr interview how many minutes asking question
Can you achieve runtime polymorphism by data members?
How do you convert int to char in java?
why using interface interface ?
What is empty list in java?
Can we sort a map in java?
What is the final access modifier in java?
What is a arraylist in java?
What are the types of inner classes (non-static nested class) used in java?
What is a modifier?
Is integer a class?