How to set String Array in Java Annotation

Viewed 77378

I have declared a annotation like this:

public @interface CustomAnnot 
{
    String[] author() default "me";
    String description() default "";
}

A valid Annotation therefore would be

@CustomAnnot(author="author1", description="test")

What I can't figure out is, how to set more than one author, since author() has return String[] this should be possible.

@CustomAnnot(author="author1","autor2", description="test")

doesn't work!

1 Answers
Related