我将调用一个带有两个参数的方法,但我会像这样使用k:
polygon.addPoint((int)rs.getDouble( k++),(int)rs.getDouble( k++ ));
其实我想确保jvm先执行第一个参数,然后再执行第二个参数.如果订单以某种方式改变,参数将被传递错误的顺序.
非常感谢!
In a method or constructor invocation or class instance creation expression, argument expressions may appear within the parentheses, separated by commas. Each argument expression appears to be fully evaluated before any part of any argument expression to its right.
翻译自:https://stackoverflow.com/questions/22692809/is-passing-arguments-to-a-method-always-ordered-left-to-right-in-java