4

Is there any difference between :

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

Thanks

skaffman
  • 390,936
  • 96
  • 800
  • 764
Roman
  • 7,513
  • 17
  • 52
  • 72

3 Answers3

4

It is effectively the same

Diego Dias
  • 20,439
  • 5
  • 31
  • 35
3

Nope. They are equivalent.

Brandon
  • 2,900
  • 1
  • 22
  • 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,542
  • 10
  • 57
  • 112
Edwin
  • 21
  • 1