how to handle exceptions in core applications?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is array serializable java?

525


Define an enumeration?

615


How do you allocate memory to object?

522


What is a super method?

534


How we can generate random numbers in java?

612






What is predicate in java?

560


What are different ways of object creation in java ?

579


What is classes in java?

519


Is arraylist a class in java?

538


What is a two-pass assembler?

611


What is ph and buffers?

524


Is java a compiler?

570


Which method cannot be overridden in java?

605


What is meant by object?

583


What is 32 bit float?

563