Variable declaration
Inside a class and inside a method we can declare variables. I wish to know whether it is possible to declare variables inside a loop for example while loop, do loop and for loop etc.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Dec 6, 2011, 6:09 PM
VulpesPosted Dec 6, 2011, 5:58 PM
They must also have different names from local variables declared within the containing method as otherwise there would be no way to access the latter from within the loop.