logo

Crowdly

Browser

Додати до Chrome

Which of the following statements are true? Assume that class WildAnimal...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

Which of the following statements are true?

Assume that class WildAnimal and its subclass class Tiger extends WildAnimal exist.

a) Using List<? extends WildAnimal> is a case of contravariance.

b) In class List<E>, where E is a paramter type, the method add is implemented that allows to add an element of type E to the list:

void add (E elem) {…}

Can you build a concrete List (list with concretized types) for adding and storing WildAnimal objects?

c) Using List<? super Tiger> is a case of contravariance.

d) List<?> is compatible to a concrete List of any type.

0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.jku.at?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome