Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You are trying to perform an assignment at the class definition level, which is interpreted by the compiler as an attempt to declare a Test.this.outerString
class field innerTest
, which is naturally impossible. And inside any method you will not have access problems
class innerTest {
void someMethod() {
Test.this.outerString = "ПОК ПОК ПОК";
// или даже проще
outerString = "ПОК ПОК ПОК";
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question