Does access external class to all members of the inner class?

Read the theory on metanit for inner classes and it says that an external class has access to all members of the inner class, including fields and methods with the modifier private( https://metanit.com/java/tutorial/3.12.php ) at the same time Childa " an inner class has access to all elements of its outer class, but not Vice versa. The members of the inner class is only available in the scope of inner class and may not be used by outer class" that is a clear contradiction. How all the same?
April 19th 20 at 12:07
2 answers
April 19th 20 at 12:09
Solution
By different means "has access":
Child refers to the access to the variable directly
- metanit is referring to access via the inner class object
account = new Account(password);
account.password
thank you - Xzavier.Kessler21 commented on April 19th 20 at 12:12
April 19th 20 at 12:11
The way it is
Inner class has access to all the fields of the outer class, including those closed by using the modifier private. Similarly, the outer class has access to all members of the inner class, including fields and methods with the modifier private.

Find more questions by tags Java