Results 1 to 10 of 10

Thread: Compile with deprecation

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    31

    Re: Compile with deprecation

    Yap, if I'm not mistaken, deprecated methods can be defined as old methods that have been substituted with other methods. For example:
    Component.show(); is now declared Component.setVisible(true);

    I don't really know, but if I'm not mistaken, it depends on the version of JDK, if u use the older one, u may not find the errors while compiling the program with deprecated methods.
    The only thing for the triumph of evil is for a good man to do nothing

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Compile with deprecation

    Quote Originally Posted by steven_luck1
    Yap, if I'm not mistaken, deprecated methods can be defined as old methods that have been substituted with other methods. For example:
    Component.show(); is now declared Component.setVisible(true);
    No, this is actually incorrect. Deprecated items, in Java, are those whose use Sun discourages, for whatever reason. For example, there are some methods in Thread that are deprecated without replacement, because they can lead to program corruption when used in special circumstances.

    I don't really know, but if I'm not mistaken, it depends on the version of JDK, if u use the older one, u may not find the errors while compiling the program with deprecated methods.
    This is correct, because items only become deprecated when Java releases a new version of the JDK. This doesn't mean, however, that it's acceptable to just use an older JDK: the method is still deprecated, it's just that it is not marked as such and the compiler thus doesn't know it.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width