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 differences between the java collection and the java list? : java collections
Which interface does java.util.hashtable implement?
Write a interface "CarOperations" with the following methods void turnOnEngin() void turnOffEngin() void turnOnLigths() void turnOffLights() void turnLeft() void turnRight() void accelerate() void deaccelerate() void putBreaks() void releaseBreaks()
Difference between Spring framework and Struts framework?
12 Answers IBM, L&T, VAM,
Explain JSP life cycle?
how to deploy the web application ?
What are the types of java collections? : java collections
What are the types of the main implementing classes in the map interfaces? : java collections
What is the enumerator of the java collection framework? : java collections
wnet use DAO design in u r project?
What causes Out of Memory exception?
Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.