What is 'finally' method in Exceptions?

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


Please Help Members By Posting Answers For Below Questions

Why does java not support pointers?

547


What is the difference between hashset and treeset in java?

533


What are three advantages of using functions?

533


How do you create a reference in java?

508


What are the steps that are followed when two computers connect through tcp?

515






What is the basic concept of java?

533


What is sizeof () operator?

566


Can size_t be negative?

608


What are dot operator queries?

623


Why string is immutable with example?

526


Why java is a platform independent? Explain

529


What are the string methods in java?

580


What is the difference between this() and super() in java?

536


Is java hashset ordered?

575


Is vector ordered in java?

537