So, you look at the Javadoc for the deprecated method which specifies:
Deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s).
You then look up DateFormat.parse
and proceed accordingly. You probably want to create a SimpleDateFormat
- or better still, use Joda Time which is a much better date/time API.
When a method is deprecated, it's always a good idea to give an indication of what existing code should be migrated to, and ideally why the old method was deprecated. Follow this guidance when you deprecate your own methods... and whenever you try to use a deprecated method, check the documentation to see if it suggests a better alternative.