Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Deprecated functions

  1. #1
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Deprecated functions

    Hi everyone.

    I'm developing a web page right now and
    i'm using Date class for some inputs in my page.

    I'm just a little curious if is it appropriate to
    use a deprecated functions in some
    classes?

    I need to use getYear, setDate and some other
    methods that are deprecated.

    is it appropriate to use these deprecated methods?
    are there any alternative ways of getting year and setting date
    in such a way that I will not use deprecated methods?

    -- sorry, I'm just new in java development.


  2. #2
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: Deprecated functions

    It is not appropriate to use deprecated API's. If you read javadoc for the deprecated API there would be an alternative suggested. Better use the alternative suggested as any bug fixes or improvements won't be available for deprecated API's.

  3. #3
    Member andbin's Avatar
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    443
    Thanks
    4
    Thanked 122 Times in 114 Posts

    Default Re: Deprecated functions

    Quote Originally Posted by dicdic View Post
    is it appropriate to use these deprecated methods?
    No, not at all!

    Quote Originally Posted by dicdic View Post
    are there any alternative ways of getting year and setting date
    Yes, java.util.Calendar
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

    Useful links for Java beginnersMy new project Java Examples on Google Code

  4. #4
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: Deprecated functions

    yeah,, i have tried it and its functionality is better than the old one in Date class.. Thank you

Similar Threads

  1. Using functions in a calculator
    By aesguitar in forum Java Theory & Questions
    Replies: 9
    Last Post: November 17th, 2013, 10:54 AM
  2. Replies: 4
    Last Post: October 28th, 2013, 04:59 PM
  3. How this GUI functions
    By mathobject in forum Java Programming Tutorials
    Replies: 3
    Last Post: October 15th, 2012, 08:10 AM
  4. Hash Functions
    By Blueshark in forum Java Theory & Questions
    Replies: 3
    Last Post: July 2nd, 2012, 03:04 PM
  5. java method deprecation <deprecated>
    By jaffars.sk in forum Java Theory & Questions
    Replies: 1
    Last Post: December 16th, 2011, 05:46 PM