当操作数的类型不同,而且不属于基本数据类型时,经常需要将操作数转化为所需要的类型,这个过程即为强制类型转换。强制类型转换具有两种形式:显式强制转换和隐式强制类型转换。
清单2:Frontier: RPC中强制类型转换。
它只需调用底层Hibernate方法和添加强制类型转换。
It's just a matter of calling the underlying Hibernate methods and adding the casts.
它进行静态类型检查,并且不允许强制类型转换,因而对于类型而言是安全的。
It is statically type-checked and does not allow type coercion, so is safe with regards to types.
应用推荐