Generic Method with Lower Bound

Java-Generic Method with Lower Bound

Generic Method with Lower Bound Lower bounds are useful for cases where we want to be sure that a particular container instantiation can hold a particular element type, without limiting it to just the specific type of the element. For example, consider the following generic method: Note that T extends Comparable<T>. The Comparable is an generic interface declared … Read more…