What is "finally" keyword?

Answer Posted / pathan muzafar

Finally is a keyword which is used execute the blocks after try and catch blocks even if exception occured or not in both try and catch block.

Note: Here,Block means collection of statements(variables,methods etc)....
Exception means Run time error during execution

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you implement polymorphism in our day to day life?

2764


What are the basic interfaces of java collections framework?

611


Can we use switch statement with strings?

624


How many inner classes can a class have?

584


how to write a program for sending mails between client and server

1557






Can I import same package/class twice?

501


Why do we use string?

581


What is difference between classpath and path variables in java?

561


Tell some latest versions in JAVA related areas?

563


How strings are created in java?

572


Can a class have a static inner class?

611


What is the right data type to represent a price in java?

574


What are the methods of object class ?

565


What are operators and its types?

579


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1609