Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Set commands in Date method

Status
Not open for further replies.

ob1kanobee

Programmer
Dec 27, 2002
47
0
0
US
Since switching over to netbeans 5.0, I am getting a warning message that the 3 set commands below in java.util.Date have been deprecated.
The class still compiles. Have these set commands changed?
Any help will be appreciated. Thanks.
date in bold below is a variable being passed to the method using this.


Date beginDate = new Date(date.getTime());
beginDate.setHours(0);
beginDate.setMinutes(0);
beginDate.setSeconds(0);
 
Hi

ob1kanobee said:
java.util.Date have been deprecated.
The class still compiles.
Deprecated means the class/method will not compile in a future version. Classes/methods which does not compile now, are called unsupported.

Sun encourages the use of [tt]Calendar[/tt] class for such date/time manipulations.

Feherke.
 
Thanks feherke for the info. It compiles, but with a nasty message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top