For some reason, when I try to run this code, it always return that it can't find the symbol b
. Then I found that the problem was that the variable b
can't be resolved to a variable. I have no idea why it is unable to resolve it to a variable.
class Q5 {
public static void main(String[] args) {
for (int iMus = 0; iMus < 10; iMus++)
{
int b = 19 + iMus;
}
System.out.println(b);
}
}