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 differenc between Enemuration interface and iterator interface according to accessing?
Write a program to print the pattern given below
What is the difference between && and & in java?
What are byte codes?
What is purpose of find feature?
Describe the various concepts related to object oriented programming (oop).
What is the main functionality of Prepared Statement?
Define canvas?
Is 0 an irrational number?
Is int primitive data type?
What is the use of an interface?
What is file in java?