/**
* 测试Deprecated注解
* @author Administrator
*/
public class DeprecatedDemoTest {
public static void main(String[]args) {
// 使用DeprecatedClass里声明被过时的方法
DeprecatedClass.DeprecatedMethod();
}
}
class DeprecatedClass {
@Deprecated
public static void DeprecatedMethod() {
}
}
原文:http://www.cnblogs.com/loaderman/p/6407590.html