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 class component?
explain what is transient variable in java?
Explain about wait() method?
Should database connections be singleton?
What is a method type?
What is the purpose of garbage collection in java?
What is the difference between inner class and nested class?
What is an abstract class and what is it’s purpose?
What are the three parts of a lambda expression? What is the type of lambda expression?
What is stack example?
What is use of functional interface in java 8? Explain
List primitive java types?
What is the significance of continue jump statement? Explain with an example.
What is a key in java?
Explain about sets?