suppose I have package J
moreover I create a new folder in J hence it becomes a subpackage of J, let’s say it’s J.E
suppose I have a class in J named H with protected properties, and another class named T in J.E
can class T access the protected properties of H?
Sub-packages are useful only as an organizational concept. They can never be used for access control; no access relationships exist between a parent package and a child package.
From the Java Language Specification:
In the context of your problem, class T cannot access the protected properties of H unless T is a subclass of H.