java.lang package has gc() method - Java

Q.  In which package do we have the gc() method?

- Published on 16 Jun 15

a. java.lang package
b. java.util package
c. java.awt package
d. java.io package

ANSWER: java.lang package
 
The gc() method runs the garbage collector.

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)