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
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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
How to learn a new programming language in 2023Java 8 #2 Functional Programming Principle - Avoid Mutable statesJava Collections Tutorial 04 | LinkedList in Java | LinkedList |Java9s.comJava Tutorial # 3 | Introduction to Java part 3 - How object oriented programming worksJava 8 Tutorial # 1 - An Introduction to Java 8 FeaturesOCJP tutorial | Java Classes, methods and Inheritance | SCJP tutorial | Java9sIntroduction to J2EE Part-2 | JEE TUTORIAL PART 2 - J2EE CLIENT AND SERVERJava 8 # 4 Functional Programming and Object oriented programming approach. How they are differentStruts 2 actions | ActionSupport | ModelDriven | wildcardsJava Tutorial #1 - Introduction to Object Oriented Programming in java - java9sGenerics in Java # 4 - Generics - Inheritance and Subtyping | Java9sJava 8#3 Stateless Functions in Functional Programming | Java9s.comJava Collections Tutorial 02 | List - ArrayList in Java | Java9s.comJava String Methods Explained | Java9s.comSpring AOP tutorial - Part 2 | Aspect Oriented Programming Tutorial - Part 2Generics in java # 3 - Bounded Type Parameters & Multiple Type parameters | Java9sJava Tutorial # 23 | Multithreading in Java Part 2 | Thread States | Java Tutorials by Java9sJava Inner Classes - 1 Introduction to Inner classes - Inner classes Tutorials | Java9s.comGenerics in java # 2 - Declaration and Instantiation of Generics code | java9sSingleton pattern in Java | Design Patterns tutorial 01 | Java9s.com