how to handle exceptions in core applications?
Answers were Sorted based on User's Feedback
in core java, we can handle the exception by the following
key words
1.try
2.catch
3.finally
4.throws(it throws only predefined exception)
5.throw(it throw both predefined and userdefined exception)
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / laxmi
In core applications we can handle the exceptions by using
try &catch blocks.
ex:
class excep
{
public static void main(String[] args)
{
try
{
System.out.println(2/0);
}
catch(Exception e)
{
System.out.println(e);
}
}
}
Is This Answer Correct ? | 2 Yes | 0 No |
what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread
Why java is a platform independent? Explain
Why local variables are stored in stack?
Can Anybody tell the diff b/w jdk1.6 and latest version.
What is the main difference between java platform and other platforms?
What do you mean by stack?
Why should we use singleton pattern instead of static class?
What is an example of character?
all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.
Is it possible to declare abstract class as final?What happens if we do so?
What is the implementation of destroy method in java. Is it native or java code?
Can a list be null in java?