class test
{
String name;
static String schoolName;
public static void main(String args[])
{
test s1=new test();
s1.name="张三";
s1.schoolName="gdgm";
test s2=new test();
s2.name="Tom";
s2.schoolName="Tsinghua";
System.out.println(s1.name);
System.out.println(s1.schoolName);
}
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1354/viewspace-3157485/ ,如需转载,请注明出处,否则将追究法律责任。