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 is bufferedwriter?
What is the difference between I ++ and ++ I in java?
What is the maximum length of a url?
what is singleton in java?
Explain the selection sort algorithm and state its time complexity?
Which is faster set or list in java?
How do you check if a string is lexicographically in java?
What does serializing data mean?
What is difference between local variable and global variable?
What is Java Package and which package is imported by default?
why java does not support unsigned keyword?
What is size () in java?
When should a function throw an exception?
How thread scheduler schedule the task?
What does it mean that a class or member is final?