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

Howmany classes that package java.applet.* contains?

1 Answers   TCS,


What are user defined exceptions?

0 Answers  


Explain how can you debug the Java code?

0 Answers   BirlaSoft,


What are wrapped classes in java programming?

0 Answers  


what are the oops concept in java explain with real time examples

24 Answers   Infosys, Wipro, Tech Mahindra, iNautix, Bosch, Current Technologies, Consummate Technologies, QA InfoTech, RTRT, SofTech, Thorogood, Timios, Kekran Mekran, CTS, Accenture,






What is a variable declaration?

0 Answers  


What are java packages?

0 Answers  


Explain the difference between treeset and treemap in java?

0 Answers  


what is the purpose of method overriding in java where v r completely re-defining a inherited method instead y can't v create a new method and define.If the question is very silly plz excuse me and do reply.Thank U!

7 Answers   emc2, Kumaran Systems,


How do you check if a string contains only numeric digits?

0 Answers  


What is the difference between preemptive scheduling and time slicing in java programming?

0 Answers  


What is exception handling in java?

0 Answers  






Categories