What is the primary purpose of garbage collection in Java?
- Accelerating compilation
- Enhancing network performance
- Freeing up memory
- Optimizing CPU usage
The primary purpose of garbage collection in Java is to free up memory by identifying and reclaiming the memory occupied by objects that are no longer reachable or in use.
Loading...
Related Quiz
- In a high-performance Java application, how should memory management be approached to prevent latency issues?
- Describe how a servlet can process AJAX requests using GET and POST methods.
- In RESTful web services, a _______ request is often used to update existing resources.
- In caching, __________ refers to the technique of dynamically adjusting the cache size based on current system load.
- Memory leaks in Java often occur due to __________ objects not being released properly.