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...

Explain difference between final, finally and finalize?

Answer Posted / vijayakumar chinnnasamy

final:
final keyword can be applied to vairables,method,class.
fianl variable - You can't reassign/modify values to the
vaiables.
final class- You cannt extends(inherit) the class.
final method- You cannt override the final methods.

finally:

finally is used in try-catch (i.e exception handling in
java).
Each try contain only one finally blocks not more than
one.
There is no statement between catch block and try block.
It will be execute if exception is occure or not.
Mostly used for memeory release.

finalize:
This is method used to release the occupied memeory.
finally method must be protected or public otherwise
compile time error.

Is This Answer Correct ?    74 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the definition of tree ?

1037


Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.

1028


What is empty list in java?

1071


Do we need to manually write Copy Constructor?

1031


What is the difference between stream and buffer?

964


What does index mean in java?

992


Can constructor be inherited?

1032


Is java based on c?

990


Why do we need singleton?

963


What does string [] args mean?

1008


What is the difference between Array and Hash Table?

1031


What is an example of a keyword?

1102


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1114


What does int [] mean in java?

1030


What is the difference between procedural and object-oriented programs?

972