Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET


Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?

B System.setGarbageCollection()
C Syste.out.gc()
D System.gc()
Answer & Explanation
Option: [D]

System.gc() is a program that runs for garbage collection. But it not reliable.

Computer Science Books

Your Valuable Comments Please...

Please Like Us
100% payment protection