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 boolean example?
what is singlton class?where it is use in real time senario.
What is singleton class example?
Explain reverse a linked list iterative solution in java?
Why non nested classes in java are not having marked as protected access specifier
Program to output as below formate: 1 2 3 4 5 6 7 8 9 10
Where is java located?
Why is string buffer better than string ?
Explain an intermediate language?
Hi Friends.. can any one provide the real time example for methodoverloading and methodoverriding .........
What is the difference between delete and delete[]
Is 0 true or false in java?