I was looking for Spring form validation tutorial Yesterday, an from one of those i found this lines
String message() default "{Phone}";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
the above code was for phone number field validation,If any one can explain those lines that will be helpful ,i am not asking anything about validation,( I am confuse because those are neither function nor instance as far as i think ) i never have seen these type of code in java before.
Those are elements of some annotation declaration, eg
}
and this is how it can be used
the above annotation will have default
groups
value = empty Class array