java - Notation " Class<?>... " -
i have work existing code, , didnt find notation meant : class<?>...
for instance, used in method :
public static <t> hashset<constraintviolation<t>> validate(validator validator, t resource, class<?>... groups) { return (hashset<constraintviolation<t>>) validator.validate(resource, groups); }
and called :
hashset<constraintviolation<entrydto>> l = validationtools.validate(this.validator, entrydto);
does mean "groups" optionnal ? found interesting topic : what class<?> mean in java? doesnt answer question...
thanks answers =)
the first answer have linked correctly tells class<?>
means. ...
called varargs
, , means 0 or more arguments. argument class<?>...
means number of arguments of type of class.
for more info on varargs
, see https://docs.oracle.com/javase/1.5.0/docs/guide/language/varargs.html
Comments
Post a Comment