Find why this program compiles with warnings but throws `ClassCastException` when it reads the name.
Java
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<String> names = new ArrayList<>();
List raw = names;
raw.add(42);
System.out.println(names.getFirst().length());
}
}