Answer Posted / k.k
ALL ANSWERS GIVEN ABOVE ARE WRITE.........
BUT
ONLY CASE THAT CAN SUPPRESS THE FINALY BLOCK IS
public class SupressFinallyExample
{
public static void main(String args[])
{
try
{
// the code that may cause an exception
//System.exit(0);
}
catch (Exception e)
{
System.exit(0);//if exception occure..
}
finally
{
// code to be executed irrespective of the
occurrence of exception
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How many bits is a 64 bit byte?
How do I get 64 bit java?
Explain a few methods of overloading best practices in java?
What is the advantage of functional interface in java 8?
What are advantages of using Java?s layout managers than windowing systems?
What is rule of accessibility in java?
Can a class have multiple subclasses?
How many types of java are there?
Can each java object keep track of all the threads that want to exclusively access it?
Can a class declared as private be accessed outside it’s package?
If we don’t want some of the fields not to serialize how to do that?
What is data structure in java?
What is the use of http-tunneling in rmi?
Why for each loop is used?
How do you override a method in java?