Is it possible to create Userdefined Unchecked Exception
also?If Yes, give an example?

Answer Posted / saf

You can create unchecked exception by inhereting
RuntimeException class. Spec does not say that we can't do
it but it is advisable to go for custom checked exception

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a source file contain more than one class declaration?

518


What is the purpose of main function in java?

541


How many bytes is string in java?

616


If a method is declared as protected, where may the method be accessed?

538


What does || mean in code?

545






What is string [] java?

530


What is the difference between overriding & overloading?

567


What are singleton services?

495


How do you clear an arraylist in java?

502


Which method must be implemented by all threads?

728


what is the purpose of "virtual"?

574


List the different types of classloaders in java.

506


What are the legal parameters?

513


Write a program to print 15 random numbers using foreach of java 8?

549


What does percent mean in java?

592