void (String[] args) { List<String> origList = Collections.singletonList("foo"); List<Integer> casted = (List<Integer>) (List<?>) origList; System.out.println(origList.get(0).length()+casted.get(0)); }