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
How hashmap increases its size in java?
What is the mapping mechanism used by java to identify IDL language?
Why string is not a wrapper class?
Name four container classes.
What is unicode datatype?
How many bits is a 64 bit byte?
Can this keyword be used to refer static members?
Can you declare a private method as static?
How to convert string to byte array and vice versa?
What is the difference between scrollbar and scrollpane?
What is ‘has a’’ relationship in java?
Why we used break and continue statement in java?
What is gui programming?
What are the basics of core java?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain