标签:style color os ar new on 对象 return
class Person {
private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String toString() {
return "Nmae:" + this.name + ",Age:" + this.age;
}
public void finalize() {
System.out.println("Object be released---->" + this);
}
}
public class SystemDemo04 {
public static void main(String[] args) {
Person person = new Person("VON KENMO", 38);
person = null;
System.gc();
}
}
标签:style color os ar new on 对象 return
原文地址:http://www.cnblogs.com/vonk/p/3910214.html