0
I am reading a row of a file and I need the loop to stop when I find a space or a =. I did the code below but it is not working, even if it has space or = on the line, it continues the loop.
for (int i = 0; i < line.length(); i++){
if (line.charAt(i) != ' ' || line.charAt(i) != '='){
instruction += line.charAt(i);
continue;
}
I can’t find my mistake.