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

Assignment Help:

 

 

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.

 


Related Discussions:- Basic difference b/w finalize(), final and finally in java

Create a fifa coins website, Project Description: I want to create simil...

Project Description: I want to create similar site: fifacointrader I want similar site like fifacointrader.com Skills required are HTML, Java, PHP, Website Design, Wordpre

What are the advantages of jms, One of the principal benefits of JMS messag...

One of the principal benefits of JMS messaging is that it's asynchronous. Thus not all the pieces require to be up all the time for the application to function as a whole.

Define object lock and which kinds of object have locks, What do you think ...

What do you think about an object's lock and which kinds of object's have locks?

Android app for username and password, Hi, I have an android sdk assignment...

Hi, I have an android sdk assignment which is due monday night. The user will enter the following information. url address www.google.com user name [email protected] password 12

I am requiring webcam software integrated into my site, I am requiring webc...

I am requiring webcam software integrated into my site I have website and I am wanting webcam software integrated into my site the company I have found doesn't offer support in

Roster entries in chat application, The roster lets you keep track of the a...

The roster lets you keep track of the availability ("presence") of other users. A roster also allows you to organize users into groups such as "Friends" and "Co-workers". Other IM

Describe two reasons driving the termination of processes, Question 1: ...

Question 1: (a) Describe two reasons driving the termination of processes. (b) Discuss the five main steps the OS would implement once it has decided to create a new proc

What do you mean by auto wiring, The Spring container is able to autowire r...

The Spring container is able to autowire relationships among collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for

A simple desktop software, A simple Desktop Software Project Description...

A simple Desktop Software Project Description: We want a tool that could convert Flash Games into HTML5 Files. These are not tedious games, very simple game. I have attached

Create an interface with a method concatenation, a)  Using Java, create an ...

a)  Using Java, create an interface with a method called concatenation which will be implemented in the class patient in part b. b)  Using Java, write the class patient with the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd