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 a char in java?
what is predefined function in java?
What are static methods?
Is Java Platform Independent if then how?
What is the minimum and maximum length of an identifier?
What is a Presistent Object?
0 Answers InfoAxon Technologies,
When abstract methods are used?
What is an iterator interface in java programming?
Which graphs are functions?
How do you use final keywords and final variables in Java?
Give example to differentiate between call by value and call by reference.
What is the difference between compare and compareto in java?