how to handle exceptions in core applications?
Answers were Sorted based on User's Feedback
in core java, we can handle the exception by the following
key words
1.try
2.catch
3.finally
4.throws(it throws only predefined exception)
5.throw(it throw both predefined and userdefined exception)
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / 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 |
Can keyword be used as identifier?
What is boolean query?
Why is stringbuffer called mutable?
What do you mean by inner class in java? Explain
Differentiate between array list and vector in java.
Write a java program to generate fibonacci series ?
What will happen if we declare don’t declare the main as static?
What is variable and constant explain with example?
What are the differences between stringbuffer and stringbuilder?
How do you check if two strings are equal in java?
How does regex work?
Explain Event handling in AWT?