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
palindrome is starting that reads both the ends.using string covert into character

Project Description: We prepare and operate smartphone application.(Picture sharing and social networking) But there are problems in server side. It's very slow. So we

Define the difference between StringBuffer and String class ?

Example:  You have a class named "Set" in a project folder "e:\myProject" and package named com.zxy.client, will you be able to compile and execute it as it is

In Java not all classes must be described separate from each other. You may put the definition of one class under the definition of another class. The class inside class is called

Java SDK is not so comfortable with people used to command line interpreter. IDEs contain compilers, editors, debugging facilities, drag and drop methods, etc. This compiler strive

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

creating connection which will authenciate for a password

iiiiii

How can I convert Dijkstra''s algorithm to do max flow instead of min flow, and how can I implement it into Ford Fulkerson algorithm?