What is SuppressWarnings (“unchecked”) in Java?

前端 未结 11 604
轮回少年
轮回少年 2020-11-22 12:48

Sometime when looking through code, I see many methods specify an annotation:

@SuppressWarnings(\"unchecked\")

What does this mean?

11条回答
  •  失恋的感觉
    2020-11-22 13:17

    The SuppressWarning annotation is used to suppress compiler warnings for the annotated element. Specifically, the unchecked category allows suppression of compiler warnings generated as a result of unchecked type casts.

提交回复
热议问题