What type of garbage collection does a System.gc() do? - Java

What type of garbage collection does a System.gc() do?

- Among various types of garbage collections, the System.gc() performs an explicit collection of garbage calls.

- It runs the garbage collector.

- When this method is called the Java Virtual Machine expend the effort for recycling unused objects in order to make the memory occupy for quick reuse.

The other garbage collection types are:

1. Throughput Collector.
2. Concurrent Low Pause Collector.
3. Incremental Low Pause Collector.
When do I need to use reflection feature in Java?
Reflection feature in java allows an executing java program for introspecting upon itself. It also allows for manipulating internal properties of the program...
Explain how to measure time in nanoseconds - Java
Time is measured in nanoseconds by using the method nanoTime() method. This method returns the current value of the most precise system timer available in nanoseconds...
Java Thread: run() vs start() method
The method start() invokes the run() method. If the run() method of two threads invoked separately, they will execute one after the other...
Post your comment