Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
克隆某个DateTime对象(或将其值分配给另一个对象)的最佳方法是什么?
DateTime
import org.joda.time.DateTime; ... DateTime date = new DateTime(); DateTime cloneOfDate = ???
只需使用:
cloneOfDate = date;
DateTime 对象是不可变的,您不需要克隆它们。