摘要: Create a class with a String field that is initialized at the point ofdefinition, and another one that is initialized by the constructor. What isthe d... 阅读全文
posted @ 2015-04-19 11:05 陶修瑕 阅读(149) 评论(0) 推荐(0) 编辑
摘要: The this keyword is also useful for passing the current object to another method: 1 class Person { 2 public void eat(Apple apple) { 3 Appl... 阅读全文
posted @ 2015-04-19 00:49 陶修瑕 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1 public class Leaf { 2 3 int i = 0; 4 5 Leaf inceament() { 6 i++; 7 return this; 8 } 9 10 void print() {11 ... 阅读全文
posted @ 2015-04-19 00:33 陶修瑕 阅读(134) 评论(0) 推荐(0) 编辑