Is it possible to create Userdefined Unchecked Exception
also?If Yes, give an example?



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

Post New Answer

More Java J2EE AllOther Interview Questions

What is an algorithm in java collection framework? : java collections

0 Answers  


how to delete cookie information?and when it will delete?

3 Answers   SolutionNET,


HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS

0 Answers  


where is JNDI being used in java platform?

2 Answers  


How to implement or use the singleton class in java?

3 Answers  


Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

1 Answers  


what is difference between business deligate and session facade ?

2 Answers   Fidelity,


Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?

1 Answers   HCL,


Can any one tell me How to explain bank project desription in interview

3 Answers   Infosys, Wipro,


What do you understand by synchronization? Why is it important?

0 Answers  


What are the different types of collections views being provided by the map interface? : java collections

0 Answers  


2. Write a interface "Car" with the following methods void setName(String) String getName() void setColor(String) String getColor() void setModel(long) long getModel()

1 Answers  


Categories