Login
Remember
Register
Ask a Question
Can we access the non-final local variable, inside the local inner class?
0
votes
asked
May 5, 2021
in
JAVA
by
SakshiSharma
Can we access the non-final local variable, inside the local inner class?
#non-final-local-variable
local-variable
java
Java-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 5, 2021
by
SakshiSharma
No, the local variable must be constant if you want to access it in the local inner class.
...