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
What are the advantages of inner classes?
What are internal and external variables?
What does n mean?
Is integer immutable in java?
What is void in java?
What are the data types supported by java?
Why are the objects immutable in java?
Is string thread safe in java?
How do you include a string in java?
What are the different types of inner classes?
Can you instantiate the math class?
What is the difference between checked exception and unchecked exception?
What are the four pillars of java?
What is a nested class?
What is mnemonic code?