Possible Duplicate:
Order of execution of parameters guarantees in Java?
If I have a Java method like:
public void func(byte b, byte c) {...}
And I use it like this:
a = 0;
func(a++, a);
Wich parameter is passed first? Because if i'm not wrong, if it's the left one then b = 0 and c = 1. And if it's the right one then b = 0 and c = 0?
Thank you.
The arguments are evaluated left to right, as specified in the JLS - section 15.7.4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With