Yes, you have guessed it right. Language specifications do define the result of the multiple return statement. If your virtual machine does it differently, then it's not a spec-compliant.
Generally, when you try to execute this program, compilers will throw an exception, but still, you can execute it. But, this is against the norms of coding standards, so I would suggest you refrain such kind of coding practice.