I've figured out im using the wrong loop for the task at hand but im still wondering why it repeats this exactly 3 times:
for(ch = (char) System.in.read(); ch != ('k' | 'K') ; ch = (char) System.in.read())
{
System.out.println("sorry, you're incorrect!\n Guess again: ");
}
It prints this in the console if you don't hit k or K:
Sorry, you're incorrect!
Guess again:
Sorry, you're incorrect!
Guess again:
Sorry, you're incorrect!
Guess again:
[] <--represents where you would input next character
I'm just wondering why it's repeating three times, instead of once or four times, or inifinite times.