@SuppressWarnings 使用

@SuppressWarnings注解主要用在取消一些编译器产生的警告 如图所示: 【加注解之前】 【加注解之后】 这时候我们在方法上加上@SuppressWarnings注解就可以消除这些警告的产生,注解的使用有三种: @SuppressWarnings(“unchecked”) [^ 抑制单类型的警告] @SuppressWarnings(“unchecked”,“rawtypes”) [^
相关文章
相关标签/搜索