how to handle exceptions in core applications?

Answers were Sorted based on User's Feedback



how to handle exceptions in core applications?..

Answer / tamilvanan

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

how to handle exceptions in core applications?..

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

Post New Answer

More Core Java Interview Questions

What is boolean example?

0 Answers  


what is singlton class?where it is use in real time senario.

1 Answers   Wipro,


What is singleton class example?

0 Answers  


Explain reverse a linked list iterative solution in java?

0 Answers  


Why non nested classes in java are not having marked as protected access specifier

2 Answers   Google,






Program to output as below formate: 1 2 3 4 5 6 7 8 9 10

4 Answers   Huawei,


Where is java located?

0 Answers  


Why is string buffer better than string ?

0 Answers   Cyient,


Explain an intermediate language?

0 Answers  


Hi Friends.. can any one provide the real time example for methodoverloading and methodoverriding .........

2 Answers   Honeywell,


What is the difference between delete and delete[]

0 Answers   Amazon,


Is 0 true or false in java?

0 Answers  


Categories