I am trying to return the value of my boolean variable localFound at the end of my code but when I compile, I get an error that says it cannot find the symbol. I know this is a
localFound is not defined in the scope of your return statement. It only exists within your if statement.
localFound
return
if
Move the declaration outside of your if statement, and initialize it to some default value, such as false.
false