Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are the differences between final,finally,finalize
methods?

Answer Posted / ravi

A "final" method or variable is one that can't be overridden
- you can define a method as final within a class to ensure
that any extensions to the class don't replace it.

If you add a "finally" block onto the end of a try / catch
exception handler, you're defining a block of code that will
be run if the try is entered, even if problems occur and
your method returns from within a catch rather than continuing.

A "finalize" method is your destructor method - code that's
run to clean up objects that are no longer required. For
example, objects which are memory cached would be flushed
back to the disc in your finalize.

Is This Answer Correct ?    8 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between error and an exception?

1076


Is a class subclass of itself?

1035


What is the program development process?

935


What is the hashcode () and equals () used for?

966


How can we find the actual size of an object on the heap?

1271


How to print nodes of a Binary tree?

2210


What are the five major types of reference sources?

1051


What is a condition in programming?

968


What is the different types of functions?

1000


How do you read a char in java?

958


Why singleton is not thread safe?

950


What is complexity in java?

980


What is parsing a sentence?

1009


What are inbuilt functions in java?

1013


When the constructor of a class is invoked?

983