JAVA Variable declaration not allowed here

string must be changed to String.

By writing int score you’re trying to declare a new variable that already exists, which you declared before already. Just remove the int part and you will get the assignment you want.

Leave a Comment