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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in java.util.Date;

Status
Not open for further replies.

aryajur

Programmer
Jul 2, 2003
45
US
I have created a form in a midlet and in the constructor of the Form I do this

timeObject = new Date(1, 0, 1, 0, 45, 0);

But when I try to compile it I get an error message in WTK saying "cannot resolve symbol" with the arrow pointing towards new.

I have imported
import java.util.Date;

I have also declared
private Date timeObject;

What is wrong?? Why isn't this working?? Please anybody help !!
 
That constructor has been deprecated :

* @deprecated As of JDK version 1.1,
* replaced by <code>Calendar.set(year + 1900, month, date,
* hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
* month, date, hrs, min, sec)</code>.

It might be different for a midlet ? (I never used midlets)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top