单项选择题

在多线程并发程序设计中,能够给对象x加锁的语句是

A.x.wait()
B.synchronized(x)
C.x.notify()
D.x.synchronized()