`
ladymaidu
  • 浏览: 676918 次
文章分类
社区版块
存档分类
最新评论

The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it

 
阅读更多

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);

分享到:
评论

相关推荐

    Java邮件开发Fundamentals of the JavaMail API

    Instead, it defines the content of what is transferred: the format of the messages, attachments, and so on. There are many different documents that take effect here: RFC 822 , RFC 2045 , RFC 2046 , ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Another useful rule of thumb: it's typically not cost effective to inline functions with loops or switch statements (unless, in the common case, the loop or switch statement is never executed)....

    servlet2.4doc

    The default behavior of this method is to call addDateHeader(String name, long date) on the wrapped response object. addDateHeader(String, long) - Method in interface javax.servlet....

    JSP Simple Examples

    We use the if condition to check if the particular condition is true then it should perform a certain task, and if a particular condition is not true then it should do some other tasks. ...

    Java自定义异常案例--ExceptionManager(java源码)

    * @param msg the detail message which is the part of the information will be * shown. */ public ExceptionManager(String msg){ super(msg); } /** * Constructs a new instance with ...

    hash table spell checking

    Goals: This assignment is designed to reinforce the student's understanding of the use of hash tables as searchable containers. Outcomes: Students successfully completing this assignment would master...

    数据结构作业Hash表

    Goals: This assignment is designed to reinforce the student's understanding of the use of hash tables as searchable containers. Outcomes: Students successfully completing this assignment would master...

    Android代码-Watchface-Constructor

    It offers customization of the following features: Background colors and images Watch hands Placement of watch hands Ambient mode How it works? Pull this repository Build and install weareble ...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    connector's end point moving, the link is breaks if the move was not on one of the flex-controls connection points. Contain False as default. - ADD Added ControlDocRect parameter in event ...

    Selected.Topics.in.Cplusplus.15117

    C++ is a language that sets itself a bit apart from the rest. C++ has no garbage collection. You need to collect your own garbage. C++ has stack memory and heap memory. You need to control where you ...

    java实验6(Person.java)

    Initialize the attributes of one of the Person objects by supplying parameters to it's constructor. Instantiate the other Person object with the default constructor (that does not accept any ...

    nao机器人java语音源码

    It automatically changes the voice used since each of them is related to a unique language. If you want that change to take effect automatically after reboot of your robot, refer to the robot web ...

    Android代码-mirror

    Mirror Easy reflection for Java and Android ...The Mirror class generates an implementation of the CoolClass interface. CoolClass coolClass = Mirror.create(CoolClass.class) You'll need to set up the wrap

    一个跨平台的CString源码

    // the string did NOT contain any of the given characters // // 2002-OCT-21 - Many thanks to Paul DeMarco who was invaluable in helping me // get this code working with Borland's free compiler as well...

    ssd exercise1

    The advertisement should be input the following data members of the class in the following form. title\nemail\nquantity\nstart-date\nclose-date\nbody\n Notice that each field is terminated by a ...

    netWindows_0.3.0_pre2

    THE ENTIRE RISK AS TO THEQUALITY OF THE ORIGINAL WORK IS WITH YOU. THIS DISCLAIMER OF WARRANTYCONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO LICENSE TO ORIGINAL WORK ISGRANTED HEREUNDER EXCEPT ...

    Borland Delphi 2005 Architect Update 3

    s to binary with these steps4.71 of 5 Closed1685 Compiler error message refers to HIGH when it should be LOW3.43 of 5 Closed1455 GetRange method3.38 of 5 Closed1209 Context help does not work for ...

    Getting started with IntelliJ IDEA

    The development of this application will help you to understand how to work with IntelliJ's Swing GUI constructor. The book will also provide a simple code as starting point and will show you how to ...

    分数的加减乘除运算Rational Numbers

    Provide a constructor that enables an object of this class to be initialized when it is declared. The constructor should store the fraction in reduced form. The fraction 2/4 is equivalent to 1/2 ...

    AJAX and PHP.pdf

    At its roots, AJAX is a mix of technologies that lets you get rid of the evil page reload, which represents the dead time when navigating from one page to another. Eliminating page reloads is just ...

Global site tag (gtag.js) - Google Analytics