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
Create an object model for the Solar System using the following link: Provide"> Provide an abstract class called Planet and a concrete s

Web-based Application: CIA - OMP Type                                         Web-based Application Role                                          Weblogic Administrato

Texas Hold'em Poker Java Game Source Code Project Description: I am seeking Java source code for a Texas Hold'em Poker game. The game could have client and server side mod

Component Developer to code in Java: Worked for Sansri's Gateway as Software Engineer . Here I Worked as a Component Developer to code in Java and J2EE technologies Here Ensu

How we Use a Car object in a different class ? class Car { String licensePlate; // e.g. "New York 543 A23" double speed; // in kilometers per hour double maxSpeed;

It could be something simple for a good js coder. But there may be a custom design and I can give more feedback for the person who is interested in working with me. Check Invisi

Each time an object is started in Java it goes into the area of memory named as heap. The primitive variables like double and int are allocated in the stack, if they are local inst

Define the key weakness of the web? the key weakness of the web is Initially web was designed only for humans to read not for computers to understand it.

How to get all the registered objects in a rmiregistry? Ans) Using list method of Naming Class.

Please check out the given instruction that I received to do the assessment. I can provide you that link to go on and submit the answers. To assess your coding skills, we would