Basic difference b/w finalize(), final and finally in java, JAVA Programming

 

 

1.   final - it is a constant declaration.

2.   finally - handles exception. The finally block is optional and gives a mechanism to clean up regardless of what occurs within the try block. Use the finally part to close files or to free other system resources like database statements, connections etc.

3.   finalize() - method performs in garbage collection. A method that is called before an object is discarded by the garbage collector, appearing it to clean up its state. Could not be need to release non-memory resources like sockets, file handles, database connections etc because Java has only a fix number of these resources and you do not know when the garbage collection is working to kick in to release these non-memory resources through the finalize() method.

 

Posted Date: 7/25/2012 2:25:11 AM | Location : United States







Related Discussions:- Basic difference b/w finalize(), final and finally in java, Assignment Help, Ask Question on Basic difference b/w finalize(), final and finally in java, Get Answer, Expert's Help, Basic difference b/w finalize(), final and finally in java Discussions

Write discussion on Basic difference b/w finalize(), final and finally in java
Your posts are moderated
Related Questions
Please can you write some codes and their functions too. At least 10! Please

Project Description: I need a new payment gateway of my own. I mean new payment gateway not any integration. So please bid only if you had made a payment gateway former like

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

tag shows all the errors. iterates over ActionErrors request attribute.


Hi, For my network and security class. I have a project where I need to create a program that take an input and encrypts it and then you can also enter that value into another tex

Normal 0 false false false EN-IN X-NONE X-NONE

What are the different messaging paradigms JMS supports? Ans) Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p.

Explain Booleans in java? Booleans are named after George Boole, a nineteenth century logician. Every boolean variable has one of two values, true or false. These are not the s

Modify both of the above clients (to write separate clients) to extract the exchange rate from a live web service that performs currency conversion. You can choose a Java or a .NET