Check the positioning of the { } again. For some reason the scope of the for loop does not include k on line 34.
class ForDemo {
public static void main(String[] args){
for(int i=1;...
Type: Posts; User: jps
Check the positioning of the { } again. For some reason the scope of the for loop does not include k on line 34.
class ForDemo {
public static void main(String[] args){
for(int i=1;...
Check the { }
It seems the compiler believes k is not defined within scope every time it is being used.
Look at line 34's use of k