Roman
Roman

Reputation: 8231

reflection java ? extends

Is there any difference between :

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

Thanks

Upvotes: 4

Views: 481

Answers (3)

Edwin
Edwin

Reputation: 21

The same, 'cos every class extends Object.

It's analogous to saying

class MyClass

and

class MyClass extends Object

are the same thing.

Upvotes: 2

Brandon
Brandon

Reputation: 2920

Nope. They are equivalent.

Upvotes: 3

Diego Dias
Diego Dias

Reputation: 22606

It is effectively the same

Upvotes: 4

Related Questions