The question is not of practical importance, but very interesting in terms of understanding the language.
public class A { private class B {} private String myFinalNameField; private B b = new B() { private void myMethod(String myFinalNameFields) { [???]myFinalNameFields = myFinalNameFields; } }; } How to assign a class A value to the myFinalNameFields field of the myFinalNameField parameter of the myFinalNameFields method of the B class? Most likely, I incorrectly formulated the question, this can be done by adding for example a prefix:
public class A { private class B {} private String prefixMyFinalNameField; private B b = new B() { private void myMethod(String myFinalNameFields) { prefixMyFinalNameField = myFinalNameFields; } }; Is it possible to access the private non-static field of an external class, something like this or super . Those. to have absolutely identical field names, but to distinguish which variable belongs to which class, it is more accurate to carry out the assignment.
Вопрос не несет практической значимости- not true, a very useful question - diraria