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
Give some features of interface?
How is string stored in java?
Can an interface extend a class?
What about method local inner classes or local inner classes in java?
What happens if we don’t override run method ?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
When do you get classcastexception?
Can an interface be defined inside a class?
Tell me about different OOPS concepts.
Explain the difference between arraylist and linkedlist in java?
How many bits is a string in java?
What advantage do java's layout managers provide over traditional windowing systems?
Is char a method in java?
What is meant by interface?
What is difference between Heap and Stack Memory?