Consider the following scenario: You are working on a high-performance Java application that processes large amounts of
Question:
Consider the following scenario:
You are working on a high-performance Java application that processes large amounts of data in real-time, and you want to optimize the garbage collection process to minimize the impact on the application's performance.
Which of the following statements is true about Java garbage collection?
A) Garbage collection pauses are always proportional to the size of the heap and cannot be reduced.
B) Garbage collection pauses can be minimized by using a low-pause garbage collector such as the G1 collector.
C) Garbage collection pauses are not affected by the size of the heap and are solely determined by the number of live objects.
D) Garbage collection pauses can be eliminated entirely by manually freeing memory using the System.gc() method.
Note: You can assume that the application you are working on is highly performance-sensitive and that minimizing garbage collection pauses is a critical goal.
Business Research Methods
ISBN: 978-0073521503
12th edition
Authors: Donald R. Cooper, Pamela S. Schindler