2012年9月11日
摘要: 1、 如果要生成对外部类对象的引用,用.this,用法如下: 1 public class DotThis { 2 void f() { 3 System.out.println("DotThis.f()"); 4 } 5 6 public class Inner { 7 public DotThis outer() { 8 return DotThis.this; // A plain "this" would be Inner's "this" 9 }10 }11 12 pub... 阅读全文
posted @ 2012-09-11 16:38 clara_babybear 阅读(228) 评论(0) 推荐(0) 编辑