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


Please Help Members By Posting Answers For Below Questions

These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

605


What is a module function?

562


What is the association?

557


What is oop principle in java?

553


What is difference between == and === in js?

555






Can we restart a dead thread in java?

558


What is the file type?

561


What does \ mean in regex?

626


What is the symbol for line break?

612


Name some classes present in java.util.regex package.

610


What is the maximum size of arraylist in java?

498


What are the 5 types of research methods?

593


What is function and its uses?

575


How does multithreading take place on a computer with a single cpu?

553


How do you implement tree mirroring in java?

597