Where are local variables declared in Java?
Advertisements
Question
Where are local variables declared in Java?
Very Short Answer
Advertisements
Solution
In Java, local variables are declared inside a method, constructor, or block of code. They can be accessed and used only within the method or block in which they are declared.
shaalaa.com
Is there an error in this question or solution?
