The compiler will simply emit an unchecked conversion warning, because it doesn't know if the cast is safe or not.
编译器仅仅发出一个类型未检查转换警告,因为它不知道这种转换是否安全。
Unchecked generic type operation The compiler will issue an error or warning whenever it encounters an unchecked generic type operation.
Unchecked generic type operation编译器每当遇到未经检查的泛型类型操作,就将发出一个错误或者警告。
Similarly, instanceof checks on naked type parameters will result in an "unchecked" warning at compile time and the check will not occur as expected at runtime.
同样,对“外露”类型参数的instance of检查将在编译时产生“unchecked”警告,而且检查将不会如期在运行时进行。
应用推荐