0
How can I retrieve a for-loop variable outside the loop?
Hello together, I've got a simple for loop like this: for(int a=0;value;a++){ } And now I want to select the int a outside the loop like that: System.out.println(a); What do I have to change in my code that it works?
1 Odpowiedź
0
Do this:
int a = 0;
for(; a < value; a++){
}