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
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
Can you call one constructor from another if a class has multiple constructors?
What is object class in java?
What is difference between path and classpath in java?
What is private public protected in java?
What is the meaning of nullable?
What is native code?
Explain about abstract classes in java?
What is the difference between comparison done by equals method and == operator?
Can a method inside a interface be declared as final?
Give a practical example of singleton class usage?
What is difference between an object and a class?
What are the parts of methodology?
What is purpose of keyword void?
What is difference between static class and normal class?