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 |
What is Visual Source Safe(source control Tool)?
what is difference between vector and arraylist?.
Which interface does java.util.hashtable implement?
What are the different types of features of the java collections framework? : java collections
In hyderabad, which s/w training center is best for java, other than corejava what r the new tools to learn in java,which tool is best & have current requirement,pls give me information about java to learn ?
What is deque in the java collections framework? : java collections
what are callback methods?
What are the classes in the java collection framework? : java collections
what about web architecture?
where is JNDI being used in java platform?
when exactly should we use throws ,and wen exactly should we use the try and catch for exceptional handling
What are the different types of classes implemented in the set interfaces? : java collections