Java examples for java.util:List Operation
cast List to List<T>
//package com.java2s; import java.util.List; public class Main { public static void main(String[] argv) { List source = java.util.Arrays.asList("asdf", "java2s.com"); System.out.println(castList(source)); }//from w w w . j a va 2 s .c om public static <T> List<T> castList(final List source) { return (List<T>) source; } }