Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Can we access the non-final local variable, inside the local inner class?
Home
JAVA
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.
...