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
Why is method overloading not possible by changing the return type in java?
Is space a string in java?
How is the marker interface used in Java?
Can sleep() method causes another thread to sleep?
Is finalize() similar to a destructor?
How do you do absolute value in java?
What is ph and buffers?
Can we split string with in java?
What is t in generics in java?
Does java support Operator Overloading?
What does java edition mean?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Why Java is not pure Object Oriented language?
What does three dots mean in java?
What is method overriding in java ?