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

Is a boolean variable?

735


Can an interface be final?

756


Will the jvm load the package twice at runtime?

833


what are different ways in which a thread can enter the waiting state? : Java thread

710


What are the types of literals?

803


When do I need to use reflection feature in java?

823


What do you mean by object?

724


What is the importance of hashcode() and equals() methods?

787


How do you override a method?

735


What is the difference between serial and throughput garbage collector?

784


Difference between predicate, supplier and consumer ?

807


Difference between static and dynamic class loading.

799


What is a native method in java programming?

749


Can You Have Virtual Functions In Java?

853


What are the different types of methodologies?

759