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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -