Answer the question
In order to leave comments, you need to log in
Does the outer class have access to all members of the inner class?
I am reading metanit theory on inner classes, and it says that the outer class has access to all members of the inner class, including fields and methods with the private modifier ( https://metanit.com/java/tutorial/3.12.php ) at the same time, according to Schildt, "an inner class has access to all elements of its outer class, but not vice versa. Members of the inner class are available only in the scope of the inner class and cannot be used by the outer class", that is, a clear contradiction. How is it right anyway?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question