Date constructor java

前端 未结 6 1708
别那么骄傲
别那么骄傲 2021-01-18 04:49

Hello I am trying to get the current date at java at a Class I created but everything fails. I\'ve seen in many sites e.g. http://www.mkyong.com/java/java-date-and-calenda

6条回答
  •  隐瞒了意图╮
    2021-01-18 05:28

    You are using the wrong Date class.

    Have a look at your imports. Don't use java.sql.Date use java.util.Date instead.

提交回复
热议问题