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 to perform linear search in java?
Variables used in a switch statement can be used with which datatypes?
What is the difference between ArrayList and Vector? which one is better in Java
Are variables stored in ram?
What is bom encoding?
Define a java class.
What is thread synchronization in java?
Is string pool garbage collected?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is continuity of a function?
What is a marker interface?
What is the maximum size of array in java?
What is difference between fileinputstream and filereader in java?
Should a main method be compulsorily declared in all java classes?
Can a top level class be private or protected?