热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Java Garbage Collection 面试题与答案

问题 11. What is the Eden Space in the Young Generation of the Java heap?

The Eden Space is the part of the Young Generation where new objects are initially allocated. Objects surviving garbage collection in Eden are moved to the Survivor Spaces.

这有帮助吗? 添加评论 查看评论
 

问题 12. Explain the purpose of the Survivor Spaces in the Young Generation.

The Survivor Spaces (S0 and S1) in the Young Generation are used to hold objects that survive one garbage collection cycle in the Eden Space. Objects can be promoted to the Old Generation from the Survivor Spaces.

这有帮助吗? 添加评论 查看评论
 

问题 13. What is the role of the Old Generation in the Java heap?

The Old Generation is the part of the heap that holds long-lived objects. Objects that survive multiple garbage collection cycles in the Young Generation are eventually promoted to the Old Generation.

这有帮助吗? 添加评论 查看评论
 

问题 14. Explain the concept of garbage collection pause times.

Garbage collection pause times refer to the periods during which application threads are stopped while the garbage collector performs its tasks. Minimizing pause times is essential for maintaining application responsiveness.

这有帮助吗? 添加评论 查看评论
 

问题 15. What is the difference between garbage collection and memory leak?

Garbage collection is the process of automatically identifying and reclaiming unused memory, while a memory leak occurs when the application fails to release memory that is no longer needed, leading to increased memory consumption over time.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。