Class access

However, if a static member of that class(class which has no access specifier) is
public, the client programmer can still access that static member even
though they cannot create an object of that class

做了下验证,如下:
package test.aaa;
class A {
	public static String TEST = "A";
}

package test;
public class C {
	public static void main(String[] args){
		System.out.println(test.aaa.A.TEST);
	}
}


但是eclipse下提示The type test.aaa.A is not visible,thinking in java第三版是讲jdk1.5的,我用的是1.4,不知道是不是这个原因,回家去试试.. - -!

------------------------------------------------------------------------------------
回来试了试好像也不行,那位兄弟知道原因通知一下...- -!

你可能感兴趣的:(java,eclipse,C++,c,Access)