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 |
"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the java code dynamically? pls reply this questions
wnet use DAO design in u r project?
What is iterator in the java collections framework? : java collections
whats the relation ship between LDAP and JNDI?
Which server-side script takes the input from JavaScript, can access the database if it needs to, and processes the data.
what is the difference between checked and unchecked Exceptions?
how to delete cookie information?and when it will delete?
I have include a jsp page by using <jsp:include page="/.../xyz.jsp"/> The thing is that the xyz.jsp page has its submit button.When i click on that button the whole main page get refreshed.But i want to refresh only the xyz.jsp page.How could i achive it so that i can only refresh the xyz.jsp not the main page page?
Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword
Which java collection class can be used to maintain the entries in the order in which they were last accessed?
my interviewer asked me what technical specification you used how to answer that question
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?