boolean check(){
for (int j = 0; j < grid.size(); j++) {
if (grid.get(j-1).visited = true
) {
return true;
}
}
}
i want run some fuction after the class in a arraylist all been visited.
then this come up"a condition expression should not be reduced to an assignment"
i know it will return true after every check.but i really dont know what to do.