Bounded Type Parameter in Java Generics
Bounded Type Parameter in Java Generics
In Java Generics, a situation can arise where we need to restrict or bound an object type to specific types only in order to narrow down the acceptable types supported in the type parameter. For instance, a method that deals with numbers, should accept Number and its sub-classes. Bounded Types: The concept of limiting type parameter upto certain type is known as bounded types. In this, extends…
View On WordPress













