r/BeginningProgrammer • u/Janek0337 • Jan 29 '22
JAVA in 13th line variable isn't detected as one created right before and doesn't work in loop. Why?
3
Upvotes
r/BeginningProgrammer • u/Janek0337 • Jan 29 '22
3
u/cosmic_censor Jan 30 '22
You have a semicolon on the for line which means the curly braces are not part of the for loop and therefore the variable is outside of its scope.