Is it possible to create Userdefined Unchecked Exception
also?If Yes, give an example?
Answer Posted / 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 |
Post New Answer View All Answers
What are the queues in the java collection framework? : java collections
What are the classes in the java collection framework? : java collections
Should we create system software ( e.g operating system ) in java ?
How do I find jre path in windows?
What is an algorithm in java collection framework? : java collections
what is mean by hasing and maping in java platform and advantage?
What are the uses of the set interfaces in the java collections? : 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 ?
Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com
can u draw class/object diagram for ATM
What do you understand by synchronization? Why is it important?
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
What is java collection? : java collections
What are the considerations to be made in case of loops in java ?
How is hashset maintained in memory by java ?