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
Can we access the non-final local variable, inside the local inner class?
When would you use a static class?
What happens if an exception is throws from an object's destructor?
How do you compare two objects?
Are generics important java?
What are the different types of data structures in java?
What are the wrapped, classes?
How to print nodes of a Binary tree?
What is a modifier?
What is difference between path and classpath in java?
What is use of super keyword?
What is difference between == and === in js?
How does arraylist work in java?
Is java same as core java?
What are heterogeneous objects?