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
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
What do you understand by synchronization? Why is it important?
How do I find jre path in windows?
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
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
What are the types of the main implementing classes in the map interfaces? : java collections
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.?.
Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?
What is the difference between comparable and comparator in java.util pkg?
What are the types of interface used in the java collections? : java collections
Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.
What is the use of hashcode in java ?
What is java collection? : java collections
What are the different types of ways where you can iterate over a list? : java collections
What is the Spring2.5 MVC Navigation flow?