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 the synonym of framework?
What is <> used for in java?
What is meant by throwing an Exception?
Can a class have multiple subclasses?
What is java reflection?
what are the different non-access specifiers in java?
How does split work in java?
What is use of set in java?
What are the two types of java programming?
what is deadlock? : Java thread
how to transactions(Bank transactions) in business process in ejb?
How do you reverse a string in java without using string buffer?