我正在使用 netbeans 7.2。 IDE 对类名应用了换行符,这是什么意思以及如何解决它?
Date cookiedate = new Date(timeStamp);
看看照片看起来如何
最佳答案
我怀疑这意味着它已被弃用。请参阅此处 more info .
Java provides a way to express deprecation because, as a class evolves, its API (application programming interface) inevitably changes: methods are renamed for consistency, new and better methods are added, and fields change. But such changes introduce a problem. You need to keep the old API around until developers make the transition to the new one, but you don't want them to continue programming to the old API.
The ability to deprecate a class, method, or member field solves the problem.
我建议使用 Joda-Time相反(相对于此处其他发帖者提出的建议),因为未弃用的 Date
/Calendar
内容使用起来非常痛苦(非直观的 api ,可变,线程不安全)
关于java - 为什么在新日期的代码中使用linethrough,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12978995/