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 four pillars of java?
Why java is made?
Is array passed by reference in java?
Is intellij better than eclipse?
what do you mean by java annotations?
Difference between error and exception
Does isempty check for null?
How are destructors defined in java?
Is call by reference possible in java?
what is synchronization and why is it important? : Java thread
How many digits can a float hold?
What is difference between length and length() method in java ?
Can java run on google chrome?
Why do we need variables?
Can we have try without catch block?