answersLogoWhite

0

Hi,

This is suneetha. We use Finalize() method in java instead of destructors.

Finalize() is used to release the memory before the garabage collection takes place.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Is destructor allowed in java?

No. Java does not support the concept of Destructors like C


How does java support the concept of destructer in java?

In Java, Java does support the concept of destructor, it's done via special method finalize.


Do you have destructer in java?

No. Memory management is handled automatically in Java, so there is no need for a destructor. Also, you can use a finalize block of code where you can assign all large objects to null. This can significantly aid the memory management a.k.a garbage collection done by the JVM.


What is the use of java language for a computer science engineer?

Java is a programming language. The computer science engineer may decide to use the Java language to do his programming - or somebody else may have done the decision for him, in a company at which he works. Or they might decide to use some other language instead.


What are destructor in java?

Destructors in Java are called finalizers. Every class can define a finalize() method that will get called automatically by the garbage-collector when an instance of the class gets garbage-collected. Finalizers are not guaranteed to get called, as the instance might never get collected.


When was Varroa destructor created?

Varroa destructor was created in 2000.


Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.


How pointers are used in java?

They aren't. Java uses the (safer) idea of references instead of pointers.


Why java does not support destructor?

AMIT KUMAR3th Nov , 2014Java does not support destructors, since java supports the concept of garbage collection,hence the garbage collector is used to automatically free the space which has occupied by the program while running.Garbage collector calls the finalize() method which is defined in the object class. finalize() method is called once for each object.


What is l drago destructor ultimate move?

Dragon Emperor Life Destructor.


How do you implement inheritance in c plus plus?

You implement inheritance by deriving a new class of object from an existing class of object. The existing class is known as the base class of the derived class.Classes declared final cannot be used as bases classes and classes without a virtual destructor (or a virtual destructor override) cannot be used as polymorphic base classes.


Cannot get java to work on windows browser?

Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.Sometimes you have to download Java from the relevant Web page. Sometimes it helps to use a different browser. For example, if you usually use FireFox, try Opera or Google Chrome instead.