这个异常是由显式类型转换抛出的,因为测试用例试图把类型为String 的东西转换成Integer。
The exception is thrown by the explicit cast because the test case is trying to convert something of type String to an Integer.
原来的查询比较一个字符串和一个数字,但是在修改后的查询中执行了显式的类型转换。
Here the original query is comparing a string to a number but in the modified query, explicit type-casting has been done.
提供了完整的函数集,因此可以把这些值显式地从一种类型转换为另一种类型,将这种转换作为它们在XPath 2.0中操作的一部分。
A full set of functions is provided so you can explicitly convert these values from one type to another as part of their manipulation in XPath 2.0.
JBoss没有显式地绑定Account参数,而是提供了对当前正在执行的对象的反射访问,因此需要把类型转换到对应的类型。
Rather than binding the Account parameter explicitly, JBoss provides reflective access to currently executing objects, requiring a cast to the corresponding type.
例如,在Oracle中字符串'1 '可以与数字1比较,但是在DB 2中需要执行显式的类型转换。
For example, in Oracle, a string '1' can be compared with a numeric 1, but in DB2, explicit type-casting needs to be done.
Python中既有强制类型转换也有强迫同型,通常使用更多的是前者(“显式优于隐式”)。
Python contains a mixture of casts and coercions, with a usual preference for the former (" explicit is better than implicit ").
显式使用强制类型转换的另一个原因是:可能存在多种转换时,需要选择一种特定的类型转换。
Another reason for an explicit cast is to select a specific conversion when more than one conversion is possible.
解释类型转换的概念以及隐式和显式转换的不同。
Explains the concept of type conversion and the distinction between implicit and explicit conversion.
显式转换不能用于在不兼容的数据类型之间执行转换。
Explicit conversion cannot be used to convert between incompatible data types.
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
Generics are useful because they provide stronger compile-time type checking, require fewer explicit conversions between data types, and reduce the need for boxing operations and run-time type checks.
但是,因为隐式转换不需要程序员将一种类型显式强制转换为另一种类型,所以使用隐式转换时必须格外小心,以免出现意外结果。
However, because implicit conversions do not require programmers to explicitly cast from one type to the other, care must be taken to prevent unexpected results.
显式数值转换用于通过显式转换表达式,将任何数字类型转换为任何其他数字类型。对于它不存在隐式转换。
Explicit numeric conversion is used to convert any numeric type to any other numeric type, for which there is no implicit conversion, by using a cast expression.
如果范围变量是显式类型的,请确保该类型与循环访问的集合中的元素类型相同或可从该类型隐式转换。
If the range variable is explicitly typed, make sure that the type is either the same as, or implicitly convertible from, the type of the elements in the collection it iterates.
如果范围变量是显式类型的,请确保该类型与循环访问的集合中的元素类型相同或可从该类型隐式转换。
If the range variable is explicitly typed, make sure that the type is either the same as, or implicitly convertible from, the type of the elements in the collection it iterates.
应用推荐