Java&C# Call By Value / Reference

Java&C# Call By Value / Reference

若是基本資料型別(Primitive Data Types)
byte
short
int
long
float
double
boolean
char

傳遞參數時預設都是 call by value
非原生的物件(基本資料型別以外的物件)傳遞參數時預設都是 call by reference

帶參數的建構子也同上述

http://myleslittlewolf.pixnet.net/blog/post/23623695-java%E6%B2%92%E6%9C%89%E6%8C%87%E6%A8%99%3F-%EF%BC%8D-%E6%B7%BA%E8%AB%87%E5%8F%83%E8%80%83(reference)%E8%88%87%E7%89%A9%E4%BB%B6%E7%9A%84%E8%A4%87

http://brownydev.blogspot.tw/2011/06/java-call-by-value-call-by-reference.html