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 the constructor?
Difference between a class and an object?
What is nextline method in java?
How to instantiate static nested classes in java?
What data structures are used to perform recursion?
How can you traverse a linked list in java?
What is java oops?
What is the use of generics? When was it added to the Java development Kit?
Why java is used everywhere?
How to implement a multithreaded applet?
Can we create more than one object singleton class?
Write code of any action class?
What is the format specifier?
Is java programming easy?
Why a dead thread occurs?