????????????????????????????????????????????????????????????????????

?????????????????????????????????????κθ??????????????????????

?????????????????????????????????????????????????????????

?????????Щ??????????Щ????????????

????1???????????8????????????????

????2?????????????String?????????????

????3??Strng???????????????????????????????????

???????????????????

????Student.java

package com.tianjf;

public class Student {
 private String name;

 public Student??String name?? {
  super????;
  this.name = name;
 }

 public String getName???? {
  return name;
 }

 public void setName??String name?? {
  this.name = name;
 }

 ??Override
 public String toString???? {
  return name;
 }
}

????Test.java

package com.tianjf;

public class Test {
 
 private static void changeInt??int i?? {
  i = 1;
 }
 
 private static void changeStudent??Student student?? {
  student.setName??"????"??;
 }
 
 private static void changeString??String str?? {
  str = "456";
 }
 
 public static void main??String[] args?? {
  int i = 0;
  String str = "123";
  Student student = new Student??"????"??;
  System.out.println??"Before change: i??" + i + " " + "student:" + student.toString???? + " " + "str:" + str??;
 
  changeInt??i??;
  changeStudent??student??;
  changeString??str??;
  System.out.println??"After change: i??" + i + " " + "student:" + student.toString???? + " " + "str:" + str??;
 }
}

???????н????

????Before change:
????i??0
????student:????
????str:123
????After change:
????i??0
????student:????
????str:123

?????????н???????????int??String??????????change????????б???student????????