Is it possible to create Userdefined Unchecked Exception
also?If Yes, give an example?
Answer / chinna
Yes,
public class UnCheckedExceptionExam extends RuntimeException
{
public UnCheckedExceptionExam(){
System.out.println("No argument");
}
public UnCheckedExceptionExam(String message){
System.out.println(message);
System.out.println(initCause(new Throwable("define
exception")));
}
public UnCheckedExceptionExam(Throwable cause){
System.out.println(cause.getCause());
}
public UnCheckedExceptionExam(String message,Throwable
cause){
System.out.println(message);
System.out.println(cause.getCause());
}
}
Is This Answer Correct ? | 1 Yes | 0 No |
Which interface does java.util.hashtable implement?
What are the different types of ways where you can iterate over a list? : java collections
What are the queues in the java collection framework? : java collections
Why do you use Context Object
Should we create system software ( e.g operating system ) in java ?
How to use ANT?
What is the difference between Eclipse and MyEclipse?
What is difference between Application Server and Web Server?
What are the different types of features of the java collections framework? : java collections
What are the uses of the set interfaces in the java collections? : java collections
How to implement or use the singleton class in java?
What are the types of the main implementing classes in the map interfaces? : java collections