package cn.edu.bjut.chapter3; public class Student { private String name; private static String country = "中国"; public Student(String name) { this.name = name; } public String toString() { return "name = " + name + ", country = " + country; } public static void main(String[] args) { Student s1 = new Student("何道昌"); Student s2 = new Student("孙双双"); System.out.println(s1 + "\n" + s2); s1.country = "日本"; System.out.println(s1 + "\n" + s2); System.out.println(Student.country); } }