What is the need of "creating and throwing an
UserdefinedException" when the "Exception" class is already
available?

Answer Posted / sri

if you want you could specify your own exception that you
know is gonna happen otherwise it is recommended to handle
the exception through exception class in catch block.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between notify and notifyall method?

619


What is meant by nested loop?

546


Can you explain the private protected field modifier?

576


What is meant by collection in java?

562


What is the differences between c++ and java? Explain

590






What are the two ways in which thread can be created?

605


How do you create a null object?

516


Why doesn't the java library use a randomized version of quicksort?

552


What are the advantages of compiled language?

581


Difference between method overloading and method overriding in java ?

581


What is meant by class?

547


What is an abstract class and what is it’s purpose?

541


what is a green thread? : Java thread

576


Give any two differences between C++ and java.

564


How would you dynamically allocate memory to an array?

599