@SuppressWarnings(“弃用”)和(“未使用的”)在Java中意味着什么? [英] What do @SuppressWarnings("deprecation") and ("unused") mean in Java?

查看:129
本文介绍了@SuppressWarnings(“弃用”)和(“未使用的”)在Java中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Java或Android项目中的这些行是什么意思?

What do these lines in my Java or Android project mean?

@SuppressWarnings("deprecation")
@SuppressWarnings("unused")


推荐答案

@SuppressWarnings 注释会禁用某些编译器警告。在这种情况下,关于弃用代码(弃用)和未使用的局部变量或未使用的私有方法的警告(unused)。 本文介绍了可能的值。

The @SuppressWarnings annotation disables certain compiler warnings. In this case, the warning about deprecated code ("deprecation") and unused local variables or unused private methods ("unused"). This article explains the possible values.

这篇关于@SuppressWarnings(“弃用”)和(“未使用的”)在Java中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆