package com.zchen.annotation;
public class AnnotationTest {
@SuppressWarnings("deprecation") //调用过时的方法,用这个注解会压缩警告
public static void main(String[] args) {
System.runFinalizersOnExit(true);
//new AnnotationTest().sayHello();
}
@Deprecated //如果写的方法过时了但又要支持以前的版本就用这个注解
public static void sayHello(){
System.out.println("hello zchen");
}
@Override//子类覆盖父类的方法
public String toString() {
return null;
}
}