Deprecated (Java Platform SE 8 ) JavaScript is disabled on your browser. Skip navigation links Overview Package Class Use Tree Deprecated Index Help Java™ Platform Standard Ed. 8 Prev Class Next Class Frames No Frames All Classes Summary:  Field |  Required |  Optional Detail:  Field |  Element java.lang Annotation Type Deprecated @Documented @Retention(value=RUNTIME) @Target(value={CONSTRUCTOR,FIELD,LOCAL_VARIABLE,METHOD,PACKAGE,PARAMETER,TYPE}) public @interface Deprecated A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists. Compilers warn when a deprecated program element is used or overridden in non-deprecated code. Since: 1.5 See The Java™ Language Specification: 9.6.3.6 @Deprecated Skip navigation links Overview Package Class Use Tree Deprecated Index Help Java™ Platform Standard Ed. 8 Prev Class Next Class Frames No Frames All Classes Summary:  Field |  Required |  Optional Detail:  Field |  Element Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy. Scripting on this page tracks web page traffic, but does not change the content in any way.