A student has submitted the code below, where a variable and a method share the same name. The code doesn't run (run button grayed out) but the error is not reported.
int claraAnimation = 0;
public void act()
{
claraMovement();
claraAnimation();
}
void claraAnimation()
{
claraAnimation++;
if (claraAnimation%60 == 0)
{
animate();
}
}
A student has submitted the code below, where a variable and a method share the same name. The code doesn't run (run button grayed out) but the error is not reported.