The Java Language Specification is a better source of precise information about the language.
In this case, the relevant part is in clause 6.6.1:
Otherwise, the member or constructor is declared private, and access is permitted if and only if it occurs within the body of the top level type (§7.6) that encloses the declaration of the member or constructor.
That "within the body of the top level type" is the important part.
So basically, within the body of the same top level type (A
in your case), all the code (whether written in a nested type or not) can access any private constructor/member declaration within the same body (whether declared in a nested type or not).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…