Override 和 SuppressWarnings 都是保留在源代碼中,Deprecated 保留在運行時啊
@Documented @Retention(RetentionPolicy.RUNTIME) @Target(value={CONSTRUCTOR,?FIELD,?LOCAL_VARIABLE,?METHOD,?PACKAGE,?PARAMETER,?TYPE}) public?@interface?Deprecated?{ }
@Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) public?@interface?Override?{ }
@Target({TYPE,?FIELD,?METHOD,?PARAMETER,?CONSTRUCTOR,?LOCAL_VARIABLE}) @Retention(RetentionPolicy.SOURCE) public?@interface?SuppressWarnings?{
2024-01-18
是呀 看法一致, @Deprecated是運行時
2022-03-30
2019-10-28