In java extends declaration syntax we often see something like this:

public interface RuleBlock<T> extends Rule<T>, Comparable<RuleBlock<?>>{

The question mark also show up on other place, inside an angle bracket. It means any class, its a wildcard. Its the Generic of Java. It called bounded wildcard.

The question mark is called a type wildcard, and is typically used as the value of a type parameter in a generic method. It means that wherever the method is invoked in your code, the compiler infers a specific type to be substituted for the wildcard and enforces that at compile time. The notation ? extends X is a bounded wildcard, meaning that the deduced type must be a subtype of X.