2026年程序员中级考试Java并发编程模拟试题集.docxVIP

  • 1
  • 0
  • 约4.94千字
  • 约 13页
  • 2026-07-23 发布于福建
  • 举报

2026年程序员中级考试Java并发编程模拟试题集.docx

第PAGE页共NUMPAGES页

2026年程序员中级考试Java并发编程模拟试题集

一、选择题(共10题,每题2分,合计20分)

1.在Java中,以下哪个类是线程安全的?

A.`ArrayList`

B.`LinkedList`

C.`HashMap`

D.`ConcurrentHashMap`

2.以下哪个方法用于让当前线程休眠指定时间?

A.`sleep()`

B.`wait()`

C.`yield()`

D.`suspend()`

3.在Java中,以下哪个锁是可重入的?

A.`synchronized`块

B.`Semaphore`

C.`ReentrantLock`

D.`CountDownLatch`

4.以下哪个线程池的线程数是可动态调整的?

A.`FixedThreadPool`

B.`CachedThreadPool`

C.`SingleThreadPool`

D.`ScheduledThreadPool`

5.在Java中,以下哪个类用于实现线程间的通信?

A.`Thread`

B.`Semaphore`

C.`CyclicBarrier`

D.`BlockingQueue`

6.以下哪个方法用于中断线程?

A.`stop()`

B.`interrupt()`

C.`terminate(

文档评论(0)

1亿VIP精品文档

相关文档