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
Take the Student Choice GUI you created in Assignment and convert it to an applet.  Because standalone GUI applications and applets are so similar, a lot of the code should be reus

AJAX- HTML- XML- CSS and  Tomcat used in Java: Project Title: Zee Ads   Role                       : Developer Domain                  : Web Ads Environment

The flow control statements give you to conditionally execute statements, to repeatedly operate a block of statements, or to just modify the sequential flow of control.

Instructions Modify the program so that the computer will generate moves for the ‘O' player (it must continue to accept user input for ‘X'). A simple way to do this is to use a

i m working on an accounting software and need the java code for preparing trial balance report


You are required to implement a Java application that allows a user to create, read, update and delete data in a table in a MySQL database. Your program must use a Java class that

Illustrate an example of static variables System. out .println("some text"); -- out is a static variable JOptionPane. showMessageDialog (null, "some text"); -- showMessageDi

The Local Systems IP Address and Port Number and the Remote System's IPAddress and Port Number.

Don''t know how to write this, can anyone help me? http://wikisend.com/download/660980/Moving Blobs.zip