
Hi.....
Where is finally used and what does it do?
please tell me about that with example...
Thanks

Ans:
A finally block can appear after the try and catch blocks, and it can contain code that is run regardless of what happens within the try and/or catch blocks.
For example:
try {
trace("try");
}
catch (errObject:Error) {
trace("catch");
}
finally {
trace("finally");
}
//output: try, finally
Since no error is thrown, the catch block doesn't run. However, the finally block does run.
Similarly, the finally block will run even when an error is thrown:
try {
throw new Error();
trace("try");
}
catch (errObject:Error) {
trace("catch");
}
finally {
trace("finally");
}
//output: catch, finally
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.