The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it
2010-11-20 11:22
429 查看
The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it
You should use java.text.SimpleDateFormat to convert String value to Date. E.g.1 | private static final SimpleDateFormat sdf = new SimpleDateFormat(”yyyy-MM-dd”); |
2 | String birthDate = “ 1981 - 12 - 30 ?; |
3 | Date birth = sdf.format(birthDate); |
相关文章推荐
- The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it
- 异常-----Can't convert the date to string, because it is not known which parts of the date variable are in use. Use ?date, ?time or ?datetime built-in, or ?string.\u003Cformat> or ?string(format) built-
- 使用cocapods报错 [!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- Item5: Explicitly disallow the use of compiler-generated functions you do not want--若不想使用编译器自动生成的函数,就该明确拒绝
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- kibana提示“Your Kibana index is out of date, reset it or use the X-Pack upgrade assistant.”
- You're given a string of lower-case Latin letters. Your task is to find the length of its longest su
- 全网最详细使用Scrapy时遇到0: UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'opentype''. Please install it from ..的问题解决(图文详解)
- php首次使用date函数 遇到警告:Warning:date():It is not safe to rely on the system's timezone settings.You...
- 【条款6】Explicitly disallow the use of compiler-generated functions you do not want
- 23 How can you reverse the effects of an ALTER DISKGROUP … DROP DISK command if it has not yet compl
- 6. Explicitly disallow the use of compiler generated functions you do not want
- 解决php It is not safe to rely on the system's timezone settings. You are *required* to use the date.
- the "find" which you should kown that how to use it
- It appears as though you do not have permission to view information for any of the hosts you request
- Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextE