Java???????????????
???????????? ???????[ 2015/7/30 13:52:22 ] ??????????????????? ???????
????????????int??飺
public class TTEST {
private static List<UserEntity> mList = new LinkedList<UserEntity>();
public static void main(String[] args) {
int a = 0;
changeA(a);
System.out.println("a = "+a);
}
public static void changeA(int a){
a = 1;
}
}
?????????a = 0
?????????????int?????????????????????????????????
?????????????????UserEntity????飺
public class UserEntity {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
public class TTEST {
public static void main(String[] args) {
UserEntity userEntity = new UserEntity();
userEntity.setName("???");
changeName(userEntity);
System.out.println("name = "+userEntity.getName());
}
public static void changeName(UserEntity userEntity){
userEntity.setName("??????");
}
}
?????????name = ??????
??????????????????linkedList<Object>????飺
import java.util.LinkedList;
import java.util.List;
public class TTEST {
private static List<UserEntity> mList = new LinkedList<UserEntity>();
public static void main(String[] args) {
UserEntity userEntity = new UserEntity();
userEntity.setName("??");
addUser(userEntity);
System.out.println("name = "+userEntity.getName());
}
public static void addUser(UserEntity userEntity){
mList.add(userEntity);
mList.get(0).setName("???");
}
}
?????????name = ???
?????????????????????????????????????????
????????????????String??飺
public class TTEST {
public static void main(String[] args) {
String str= "????";
changeStr(str);
System.out.println("str = "+str);
}
public static void changeStr(String str){
str = "????";
}
}
?????????str = ????
??????Integer????????????и??
???????????????java????????????????????????????????????????
??????????????????????????????????????????????????????????????????