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

Why main() method is public, static and void in java ?

0 Answers  


What is a singleton class in Java? And How to implement a singleton class?

2 Answers  


Difference between Web-based applications,Client- Server applications and Distributed applications?

3 Answers   Infosys,


What does substring mean?

0 Answers  


Is multiple inheritance allowed in Java? Why ?

7 Answers  


Is java is a fully object object oriented language?

31 Answers   TCS,


How do you replace a string in java?

0 Answers  


What is the purpose of stub and skeleton?

0 Answers  


Is java same as core java?

0 Answers  


Explain yield() method in thread class ?

0 Answers  


Why all programming languages have main as a execution starting point?

4 Answers  


How are this() and super() used with constructors in java programming?

0 Answers  


Categories