0

I have the following two classes:

class SomeClassA<F extends E> { }

class SomeClassB<? extends E> { }

What is the difference and the limitation between SomeClassA and SomeClassB?

Michael
  • 32,527
  • 49
  • 210
  • 370

1 Answers1

1

It may gives you some idea

class SomeClassB<? extends E> { }:

A class with an unbounded type parameter. Its elements are of a specific, but unknown, type. The elements must all be the same type.

class SomeClassA<F extends E> { }:

A class with a type parameter called F. The supplied type for F must be of a type that extends E, or it is not a valid type for the parameter.

J-Alex
  • 6,881
  • 10
  • 46
  • 64