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

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

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

面试准备

Core Java 面试题与答案

Test your skills through the online practice test: Core Java Quiz Online Practice Test

问题 151. Whats the difference between notify() and notifyAll()?

notify() is used to unblock one waiting thread; notifyAll() is used to unblock all of them. Using notify() is preferable (for efficiency) when only one blocked thread can benefit from the change (for example, when freeing a buffer back into a pool). notifyAll() is necessary (for correctness) if multiple threads should resume (for example, when releasing a 'writer'?? lock on a file might permit all 'readers'?? to resume).

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

问题 152. Can a lock be acquired on a class?

Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.

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

问题 153. What state does a thread enter when it terminates its processing?

When a thread terminates its processing, it enters the dead state.

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

问题 154. What is a task's priority and how is it used in scheduling?

A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.

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

问题 155. What is a daemon thread?

These are the threads which can run without user intervention. The JVM can exit when there are daemon thread by killing them abruptly.

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

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

版权所有 © 2026,WithoutBook。