What do @SuppressWarnings(“deprecation”) and (“unused”) mean in Java?

前端 未结 4 522
终归单人心
终归单人心 2020-12-13 12:20

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

@SuppressWarnings(\"deprecation\")
@SuppressWarnings(\"unused\")
4条回答
  •  时光取名叫无心
    2020-12-13 12:42

    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.

提交回复
热议问题