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
How do I find jre path in windows?
Which interface does java.util.hashtable implement?
What is an algorithm in java collection framework? : java collections
What is the enumerator of the java collection framework? : java collections
what is mean by hasing and maping in java platform and advantage?
What is the difference between comparable and comparator in java.util pkg?
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
What are the interfaces in java collections? : java collections
Should we create system software ( e.g operating system ) in java ?
Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.
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
who will give req's to u?. how they send req's to u? . what design documents contains?. when bugs raised on other developer code how to report to them?.(throgh mail or ........). how to retrive 100 recods from dao layer to presentation layer.using which collection?. what is sequence diagram.?.
What is the use of the list interface in the java collection? : java collections
What are the types of interface used in the java collections? : java collections
What is java collection? : java collections