4

Is there any difference between :

Class<?> and Class<? extends Object> ?

Thanks

skaffman
  • 398,947
  • 96
  • 818
  • 769
Roman
  • 7,933
  • 17
  • 56
  • 72

3 Answers3

4

It is effectively the same

Diego Dias
  • 21,634
  • 6
  • 33
  • 36
3

Nope. They are equivalent.

Brandon
  • 2,900
  • 1
  • 23
  • 36
2

The same, 'cos every class extends Object.

It's analogous to saying

class MyClass

and

class MyClass extends Object

are the same thing.

CSchulz
  • 10,882
  • 11
  • 60
  • 114
Edwin
  • 21
  • 1