Add multiple annotation values

suggest change

An Annotation parameter can accept multiple values if it is defined as an array. For example the standard annotation @SuppressWarnings is defined like this:

public @interface SuppressWarnings {
    String[] value();

The value parameter is an array of Strings. You can set multiple values by using a notation similar to Array initializers:

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

If you only need to set a single value, the brackets can be omitted:


Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents