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 a compilation unit?

2 Answers  


What is a Java Virtual Machine?

1 Answers  


What are filterstreams?

0 Answers  


What is merge sort in java?

0 Answers  


What does || mean in code?

0 Answers  






What is the maximum size of a string in java?

0 Answers  


Can memory leak happen java?

0 Answers  


Is multiple inheritance allowed in Java? Why ?

7 Answers  


what is thread? What are the high-level thread states? : Java thread

0 Answers  


What are the two ways in which thread can be created?

0 Answers  


Explain what are final variable in java?

0 Answers  


write java code to print second max number in the array

12 Answers   Huawei, IBAB,


Categories