• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is depreciation of methods

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i used getHour() method in jdk1.3.the method is working properly
but a message is given that this is depreciated.
if a method is depreciated but is working fine then what has
changed with that method?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually, it means that nothing has changed within the method itself, but an already-existing problem was discovered. They don't want to invalidate old code by changing the method drastically, but they want to encourage people to use a different solution. In your case, I assume you mean the getHours() method in either java.util.Date or java.sql.Date. If you look in the API you will see an explanatory message indicating what is wrong with the method. For java.util.Date.getHours() you should really use a Calendar instance instead; for java.sql.Date you probably should use a Time object instead since a Date will always have hours = 0.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deprecated methods don't mean that something has changes.
Nothig is changed. It only means that, if future this method
will be withdrawn from the API. If you goto the API (I don't
have the link right now for 1.3) and lookup for this method,
a work-around, with new methods, is generally available and
it is highly suggested that you replace your deprecated method
with the suggested work-around.
regds.
- satya
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Holy smokes....Jim I din't know you were in the forum...
thanks.
- satya
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try to wander around occasionally.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic