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 multiple inheritance? Is it supported by java?

1015


what invokes a threads run() method? : Java thread

1059


Describe method overriding

1178


What is thread synchronization in java?

952


What is a predicate method?

1063


Write a program to check for a prime number in java?

1089


What is a package in java? List down various advantages of packages.

1337


What is a Hash Table? What are the advantages of using a hash table?

1133


What is sleep method?

1221


What are the rules for variable declaration?

1010


How can a gui component handle its own events in java programming?

1082


What differences exist between iterator and listiterator?

1086


What is the difference between sleep and wait in java?

1012


What is difference between Heap and Stack Memory?

1098


Does .length start 0 java?

1063