---
title: "Can we access the non-final local variable, inside the local inner class?"  
description: "Can we access the non-final local variable, inside the local inner class?"  
author: "Anonymous User"  
published: 2015-04-27  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2442/can-we-access-the-non-final-local-variable-inside-the-local-inner-class  
category: "java"  
tags: ["java", "nested", "class"]  
reading_time: 1 minute  

---

# Can we access the non-final local variable, inside the local inner class?

No, local variable must be constant if you want to access it in local inner class.

## Answers

### Answer by Anonymous User

No, local variable must be constant if you want to access it in local inner class.


---

Original Source: https://www.mindstick.com/interview/2442/can-we-access-the-non-final-local-variable-inside-the-local-inner-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
