how to handle exceptions in core applications?
Answer Posted / 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 |
Post New Answer View All Answers
Does constructor be static?
What is the arraylist in java?
How to display names of all components in a Container?
How do you override a method in java?
Differentiate between array list and vector in java.
How large is a boolean?
What is meant by 'bit masking' in java?
What is are packages?
Why do we create public static method in java?
Why we override equals() method?
What is meant by interface?
What is a parameter in a function?
How can constructor chaining be done using this keyword?
What is bitwise complement?
What is the difference between a break statement and a continue statement?