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 are the drawbacks for singleton class?
How to solve the problem of generating the unique hash keys with hash function?
Difference between process and thread?
What is binary search in java?
Are strings immutable in java?
What method is used to specify a container's layout in java programming?
Can we sort list in java?
How does split work in java?
What is the use of http-tunneling in rmi?
Why inputstreamreader is used in java?
How does the java compiler work?
Explain about main() method in java ?
What are the restriction imposed on a static method or a static block of code?
Explain about automatic type conversion in java?
What will be the initial value of an object reference which is defined as an instance variable?