Java 方法调用转换
Java method invocation conversion
您好,我正在阅读有关 java 类型转换的内容,所以我在 Java Oracle 制定的语言规范一书中找到了这句话:
Method invocation conversion is applied to each argument in a method
or constructor invocation and, except in one case, performs the same
conversions that assignment conversion does.
谁能告诉我例外情况是什么?
Method invocation conversions specifically do not include the implicit narrowing of integer constants which is part of assignment conversion (§5.2). The designers of the Java programming language felt that including these implicit narrowing conversions would add additional complexity to the overloaded method matching resolution process (§15.12.2).
您好,我正在阅读有关 java 类型转换的内容,所以我在 Java Oracle 制定的语言规范一书中找到了这句话:
Method invocation conversion is applied to each argument in a method or constructor invocation and, except in one case, performs the same conversions that assignment conversion does.
谁能告诉我例外情况是什么?
Method invocation conversions specifically do not include the implicit narrowing of integer constants which is part of assignment conversion (§5.2). The designers of the Java programming language felt that including these implicit narrowing conversions would add additional complexity to the overloaded method matching resolution process (§15.12.2).