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 |
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
What is a parameter in java?
How the elements are organized in BorderLayout?
Can you change array size in java?
Same common question what is Map,Set,HashMap,List????
How do you use wildcards?
What is a priority queue java?
Can a main method be declared final?
Is the milky way in a void?
what is synchronization and why is it important? : Java thread
Is java map thread safe?
What is the basic concept of java?