为了保证方法的线程安全,声明方法的时候必须用哪个修饰符?
(A)new
(B)transient
(C)void
(D)synchronized
出自:郑州工程技术学院—Java程序设计