When the compiler reaches the end of a void method does it just call return; ? Can anyone tell me where I can find documentation on such behavior?
Yes, if you look at the byte code javap -c class, you will see the RETURN instruction in void methods.
You can find out more about bytecode by reading the JVM specs.
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