Hello,
I got two file:
A.java
public class A
{
int x=0;
protected int y=0;
}
and B.java
public class B
{
A a;
public int getx()
{
return a.x;
}
public int gety()
{
return a.y;
}
}
I'm using jdk1.1.6v1 glibc jdk, I can compile B.java
successfully. However, A.java & B.java doesn't in the same package, why
it can compile successfully? B.java shouldn't had access right to A.y.
Am I wrong? Pls tell me the error.
Thanks for attention!
===================================================================
���Ѩ�ѧڹ����^���� �ڷQ�� Leung Yau Wai
���کR�B�Ÿ� �ΧڤO�E�ڸ��~ �ګY��j�q�l�p�����Ǩt�G�~��
�u�ߧڤ@��|�b�P�]�� [EMAIL PROTECTED]
���ѧڷ| �t�\���n �ڰ��� [EMAIL PROTECTED]