File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Using Deprecated API in Code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using Deprecated API in Code" Watch "Using Deprecated API in Code" New topic

Using Deprecated API in Code

Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi All,

Need your comments regarding this.

I have to make a code which does the following

1. Get a date, which is passed as a String ("2005/07/17")
2. Format the date in desirable "dd-MMM-yyyy" format.

I plan to do the following

I know that (1) has been deprecated. I would like to know, what will the impact be, if I am using it in my code. And what would be the suitable alternative?

Thanks in advance for your kind help....

ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

Alternative :

Impact of using deprecated api:

When an api is tagged 'deprecated', it means that it wouldnt probably be supported in future versions - so probably this code, say, 10 years from now
on the latest java platform at that time, would give bizzare output.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You have some SimpleDateFormat objects here ... look at the parse() method to create a Date.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Using Deprecated API in Code
It's not a secret anymore!