Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: broke out the different Java versions.

Never use deprecated fields, methods, or classes in new code. The Java SE 6 documentation provides a complete list of deprecated APIs [API 2006]. Java also provides a @deprecated annotation to indicate the deprecation of specific fields, methods, and classes. For instanceexample, many methods of java.util.Date, such as Date.getYear(), have been explicitly deprecated. Rule THI05-J. Do not use Thread.stop() to terminate threads describes issues that can result from using the deprecated Thread.stop() method.

 

The Java SE documentation provides a list of deprecated APIs for each version of the language:

 You should use the list of deprecated functions specific to the language version you are using, although it may also be possible to avoid the use of APIs that are deprecated in later versions as well if suitable alternatives are available.

Obsolete fields, methods, and classes should not be used. Java lacks any annotation that indicates obsolescence; nevertheless, several classes and methods are documented as obsolete. For instance, the java.util.Dictionary<K,V> class is marked as obsolete; new code should use java.util.Map<K,V> instead [API 2006].

...

      06. Methods (MET)