Java examples for Object Oriented Design:Generic Method
Create generic function with Wildcard
import java.util.List; public class WildcardFixed { void foo(List<?> i) { fooHelper(i);//from w ww. java 2 s. co m } private <T> void fooHelper(List<T> l) { l.set(0, l.get(0)); } }