标签:style blog http 使用 ar java sp 2014 art
class Student{
String name;
int age;
Student(String name,int age){
this.name=name;
this.age=age;
}
Student playGame(){
this.age++;
return this;
}
void printword(){
System.out.println("年龄是"+this.age+"的"+this.name+"打了一天的LOL!");
}
}
public class Test{
public static void main(String[] args){
Student Hai = new Student("Xiaohai",20);
Hai.playGame().playGame().printword();
}
}
下面是内存的分析图
标签:style blog http 使用 ar java sp 2014 art
原文地址:http://www.cnblogs.com/acgpiano/p/4002759.html