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

Why is method overloading not possible by changing the return type in java?

556


Is space a string in java?

491


How is the marker interface used in Java?

583


Can sleep() method causes another thread to sleep?

542


Is finalize() similar to a destructor?

530






How do you do absolute value in java?

503


What is ph and buffers?

498


Can we split string with in java?

511


What is t in generics in java?

534


Does java support Operator Overloading?

586


What does java edition mean?

507


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

650


Why Java is not pure Object Oriented language?

616


What does three dots mean in java?

622


What is method overriding in java ?

636