Went through a code snipped online
public Collection<? extends GrantedAuthority> getAuthorities(Integer role) {
List<GrantedAuthority> authList = getGrantedAuthorities(getRoles(role));
return authList;
}
A. Can any please tell me what does ?
signify?
B. <? extends GrantedAuthority>
which class is extending GrantedAuthority?
C. In generics we provide the class type in <> to ensure type safety, why would anyone want to provide A extends B within <>?