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 |
can u draw class/object diagram for ATM
0 Answers HCL, Zycus Infotech,
How do you debug your java program?
How do I find jre path in windows?
2. Write a interface "Car" with the following methods void setName(String) String getName() void setColor(String) String getColor() void setModel(long) long getModel()
Explain JSP life cycle?
what is filter ?
what are callback methods?
what is the difference between banking and insurance domain?
what debugging tool that can be used to debug the java programs?
Difference b/w >> and >>> ?
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
What is an algorithm in java collection framework? : java collections