score:327

Accepted answer

use the following: @suppresswarnings({"unused", "unchecked"})

score:19

if you take a look inside the annotation you will see this:

public @interface suppresswarnings {
    string[] value();
}

as you see, the value parameter is an array of strings... so the parameter in the annotation can be: value1, value2 or value3 where

final string[] value1 = { "a1" };
final string[] value2 = { "a1", "a2" };
final string[] value3 = { "a1", "a2", "a3" };

i.e.:

@suppresswarnings({"unused"})
@suppresswarnings({"unused", "javadoc"})

you can oft see something like

@suppresswarnings("unused") 

and this is a particular case allowing one element wit no "{ }"


Related Query

More Query from same tag