| November 11, 2005 02:46:13 |
#1 |
| N B Patil |
Member Since: Visitor Total Comments: N/A |
RE: Please Give me an example for User defined Excepti... |
| extend the Class from Exception and you can use the same for your purposewith either of the four constructors Exception() Constructs a new exception with null as its detail message.Exception(String message) Constructs a new exception with the specified detail message.Exception(String message, Throwable cause) Constructs a new exception with the specified detail message and cause.Exception(Throwable cause) Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).MyException extends Exception { MyExeception(String msg) { super(msg); } //} |
| |