补救方法是更改代码,以强制转换为正确的对象。
The remedy is to change the code to cast correctly to the right object.
用于弱类型变量,以将它们强制转换为另一种类型。
注意,在清单2中,从集合中提取项并不需要将其强制转换为正确的类型。
Notice in Listing 2 that fetching an item out of a collection doesn't require a cast to the right type.
应用推荐