How to send a request to garbage collector?

Answer Posted / anjum rehbar khan

Yes we can send arequest to garbage collection by writing a
simple line of code:

System.gc();

OR

Runtime.gc();

But it is simply a request not a order to JVM
because Garbage collection is JVM dependent

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array list and vector in java?

509


how to create constants in java?

612


What does string intern() method do?

589


What is double in java?

519


can any body body expalin best definitions & best real time exaples for opps concepts.

1843






which pattern is default in scanner package?

1803


What is native code?

539


Can inner class extend any class?

600


What are the java ide’s?

577


How many bytes are there?

544


How does the java compiler work?

532


What are the different ways of creating thread?

574


Which programming language is best in future?

527


What do you mean by platform independence of Java?

538


What are different types of inner classes ?

563