package basic;
class Student{
public String name;
public int age;
public Student(String name,int age){
this.name =name;
this.age=age;
}
}
public class Test {
private static void ref(Student s){
s.name ="wangwu";
s.age=12;
}
public static void main(String[] args) {
Student st = new Student("zs", 20);
Student st1=st;
ref(st1);
System.out.println(st.name +st.age);
System.out.println(st1.name +st1.age);
}