What is the need of "creating and throwing an
UserdefinedException" when the "Exception" class is already
available?
Answer Posted / vinayakkatkar
There are some exceptions that are not defined by java api
ex- invalid age exception ,invalid number exception etc.
in user defined exceptions are raised by programmer,
thrown by programmer ,handled by programmer
while predefined exceptions are raised by system,
thrown by system
handled by programmer
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you start a thread?
What is quick sort in java?
Why we use protected in java?
how come we know the object is no more used in the class?
What is the static block?
What do you mean by exception handling in Java?
What is string pool?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What two classes are used to read data only?
What are the different types of sorting in java?
What are the default and parameterized constructors?
What is stringwriter?
Difference between arraylist and hashset in java?
Lowest Common ancestor in a Binary Search Tree and Binary Tree.
What is static in java?