Hello everyone, currently I am trying to do my assignment for my Java class, however I stumbled upon a problem with using Date, because I get this: Date(java.lang.String) in java.util.Date has been deprecated
My assignment requires me use a certain date (Not the current date and time) and display it in "Fri Jan 01 00:00:00 PST 2010" format. However although
Date date = new Date ("Jan-01-2010");
does work, but it is deprecated, could someone show me how to use some other alternative? I tried looking at the Calender Class, and SimpleDate, etc.. but I have no idea after reading the docs how to do what I want to do.
Question
Lighthalzen
Hello everyone, currently I am trying to do my assignment for my Java class, however I stumbled upon a problem with using Date, because I get this: Date(java.lang.String) in java.util.Date has been deprecated
My assignment requires me use a certain date (Not the current date and time) and display it in "Fri Jan 01 00:00:00 PST 2010" format. However although
Date date = new Date ("Jan-01-2010");does work, but it is deprecated, could someone show me how to use some other alternative? I tried looking at the Calender Class, and SimpleDate, etc.. but I have no idea after reading the docs how to do what I want to do.
Thanks!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts