This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Replacement of deprecated constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Replacement of deprecated constructor" Watch "Replacement of deprecated constructor" New topic
Author

Replacement of deprecated constructor

mohan shetty
Greenhorn

Joined: Oct 26, 2007
Posts: 9
Dear all,
I have a deprecated constructor from class TimeStamp.that is public Timestamp(int year,int month,int date,int hour,int minute, int second,int nano).I need to replace this method with a suitable method or a constructor.can any one sujjest me what i need to do.I even know that i need use constructor public Timestamp(long millis).But what about the year,month,date...etc parameters which i need to get a long value from them.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41062
    
  43
You can use the java.util.Calendar object for this. Something like:



Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Replacement of deprecated constructor
 
Similar Threads
Handling java.sql.Timestamp
java Timestamp
Passing date and time using Timestamp.
help creating mutator
what is the meaning of the deprecated in APIs