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 objects of student class by calling default, Create objects of stude...

Create objects of student class by calling default Create objects of student class by calling default, parameterize and copy constructor Call student class different methods on

Netbeans, how can i create an E-exam application on netbeans

how can i create an E-exam application on netbeans

Task priority and uses in scheduling, What do you mean by a task's priorit...

What do you mean by a task's priority and how can we use it in scheduling ?

Determine the phase loading- java program development, Determine the phase ...

Determine the phase Loading- Java Program Development In phase 3, the program must first be placed in memory before it can be executed. This is done by the class loader, whic

Explain the applet in java, Explain The Applet in java? The reason peo...

Explain The Applet in java? The reason people are excited about Java as more than just another OOP language is because it allows them to write interactive applets on the web.

How to initialize array in java, How to initialize array in java ? Indi...

How to initialize array in java ? Individual elements of an array are referenced through the array name and through an integer that represents their position in the array. The

Program for sorting algorithm - java program, Introduction: In this pr...

Introduction: In this project, you will explore a few sorting algorithms. You will also test their efficiency by both timing how long a given sorting operation takes and count

Conditional statements in javascript, Very frequently when you write code, ...

Very frequently when you write code, you desire to perform distinct actions for different decisions. You can employ conditional statements in your code to do this. In JavaScript

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