How do you just the @Deprecated annotation?
Created Jun 30, 2006
John Zukowski You place the @Deprecated annotation above the method or class you want to flag as out of date. You can still use the @deprecated javadoc tag to say why something is deprecated:
public class Dep {
/**
* @deprecated Don't use this method any more.
*/
@Deprecated
public static void myDeprecatedMethod() {
System.out.println("Why did you do that?");
}
}
class DeprecatedUsage {
public void useDeprecatedMethod() {
Dep.myDeprecatedMethod();
}
}