I'm looking at the documentation of JasperReports and I do not understand the return type of the following method:
public java.lang.Class<?> getValueClass()
I'm looking at the documentation of JasperReports and I do not understand the return type of the following method:
public java.lang.Class<?> getValueClass()
 
    
     
    
    The method returns a Class object. The ? indicates that it can be any type of class. You can read more about wildcards here. These Class objects are often utilized when you're dealing with reflection.
Class<?> refers to any instance of Class. As compared to Class<? extends Collection> which would narrow the criteria down to a limited group of classes (those that extend Collection).
This is particularly important when calling methods like newInstance. If you have Class<?> a and call a.newInstance() you'll get an Object. if you have Class<? extends Collection> and call b.newInstance() you'll get an instance of Collection.
 
    
    It just returns an instance of a class. ? parameter which represents a generic wild card object i.e it is a class of any type. 
