I want to union two generic list and want to produce new list , I am providing my code in a simple format. public class Example{ public static <E> List<E> union(List<? extends E> a,List<? extends E> b){ List<Object> es= new ArrayList<Object>(); for( E e:a){ es.add(e); } for( E e:b){ es.add(e); } return (List<E>) es; } [...]
The post Combinig two generic List appeared first on BlogoSfera.