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
What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?
What will happen if a thrown exception is not handled?
What are the important features of Java 11 release?
Explain with example the concept of constant variable in java.
Are arrays primitive data types?
How to overcome the exception object reference not set to an instance of object?
What is a superclass?
What are "class access modifiers" in Java?
What is the size of an array?
What are the approaches that you will follow for making a program very efficient?
What happens if an exception is not handled in a program?
What is the arraylist in java?
Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?
How can we create an immutable class in java?
Can a main method be declared final?