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 is a numeric digit?
Explain the access modifiers for a class, method and variables?
Is java an open source?
What does || mean in vectors?
Can you make a constructor final in Java?
What are the access modifiers in java?
What is ascii format?
Explain about wait() method?
What is the difference between final, finally and finalize()?
What is return type in java?
What is stringjoiner ?
How can you read content from file in java?
Can we use a switch statement with strings?
What is the difference between a synchronized method and a synchronized block?
What is widening and narrowing in java? Discuss with an example.