public class Demo01 implements Runnable{
//三个内置注解 Override Deprecated SuppressWarnings
@Override //重写
public void run() {
}
@Deprecated //过时的 不推荐使用或存在更好的处理方法 仍可使用
public static void testMethod(){
System.out.println("过时的方法");
}
@SuppressWarnings("all") //镇压警告
public void TestMethod2(){
int a; //a未被使用而没有被警告
}
public static void main(String[] args) {
testMethod();
}
}
原文:https://www.cnblogs.com/zzzstudy/p/14613981.html