Parameter Pass
總結
- Immutable Object 參數傳遞行為同 pass-by-value。
- Mutable Object 參數傳遞行為同 pass-by-reference,但是不允許 re-assignment。
參考
https://stackoverflow.com/questions/986006/how-do-i-pass-a-variable-by-reference
https://stackoverflow.com/questions/986006/how-do-i-pass-a-variable-by-reference