1 2 3 4 5 6
import java.util.*; public class CastWithIntersection { public void test(List<?> list) { RandomAccess r = (RandomAccess & java.io.Serializable)list; } }