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 are the types of interface used in the java collections? : java collections
what is the difference between checked and unchecked Exceptions?
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?
what are advantages of HQL? what are advantages of Native SQL? what are advantages of Criteria API?
what is class/object diagram
Can any one tell me How to explain bank project desription in interview
VSS Objectives
What is the use of the list interface in the java collection? : java collections
In HashSet duplicates are allowed while adding to the HashSet, but while retreiving the object from HashSet is not shown the duplicate values, WHY ?
when exactly should we use throws ,and wen exactly should we use the try and catch for exceptional handling
what about web architecture?
which book is the best for preparing for SCWCD 1.5