Загрузка страницы

Why polymorphism does not help and we need Generics? - Explained

Why we cannot use super types which can refer to some subtypes so that we can keep the classes Generics? The answer is that using Super types or Object as reference does not help. There will be issues with type casting and it is not an effective way to make code generic and reusable.
This is the reason why generics were introduced and they are extremely helpful in defining the reusable chunks of code.
In this video i gave a real world example to explain why we need generics in java

Видео Why polymorphism does not help and we need Generics? - Explained канала java9s
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 мая 2016 г. 18:00:01
00:07:09
Яндекс.Метрика