Bounded Wildcards

Java-Bounded Wildcards

Bounded Wildcards A bounded wildcard is a wildcard that uses the extends keyword just as a type variable would to limit the range of assignable types. For example : Our ‘abc’ variable is limited to holding instantiations of Gen on parameter types of A and its subclasses(B and C). So, we can assign it a Gen<A> or … Read more…