Finalizer Method in Java

FINALIZER METHODS:

We have seen that a constructor method is used to initialize an object when it is declared. This process is known as initialization. similarly,java supports a concept called finilization,which is just opposite to initialization.we know that java run-time is an automatic garbage collecting system.it automatically frees up the memory resources used by the objects,but objects may hold another non object resources such as file descriptors or window system fonts,the garbage collector cannot free these resources.in order to free these resources we must use a finalizer method. 

The finalizer method is simply finalize( ) and can be added to any class,java calls that method whenever it is about to reclaim the space for that object.

Related

Write about Decission making & looping in Java With Example?

Decision making & looping:                                               &...

Write about Jumps in loops in java

Jumps in loops: Break : [jumping of out of a loop] Break is used to come out of a loop, an early exists from a loop can be accomplished by using break statement. The break statement can be use...

Write about Labeled loops in Java

Labeled loops: In java we can give a label to a block of statements a label is any valid java variable name. to give a label to a loop, place it before the loop with a colon(:) at the end. For...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item