case 1: 比較常見的
class Test {
String s = "hello";
class inner {
inner () {
String s = s; // <- illegal forward reference
}
}
}
case 2: 比較特別的 即使sStr是static也會
class Test2 {
static {
System.out.println(sStr); // <- illegal forward reference
}
private static String sStr = "hello World";
}
Tuesday, August 10, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment