Whoops... that's a major noob error. Fixed it and it works!
Just to wrap up though, I use the comparison operator when stating boolean loop, and then the assignment operator when I want it...
Type: Posts; User: bgroenks96
Whoops... that's a major noob error. Fixed it and it works!
Just to wrap up though, I use the comparison operator when stating boolean loop, and then the assignment operator when I want it...
I tried making the suggested changes:
public class LoopTest {
public static void main(String[] args) {
boolean isRunning = true;
while(isRunning == true) {
...
I thought == didn't work for boolean
I thought I understood how the boolean logic worked in Java perfectly fine.... but recently when I was writing some code I noticed something wasn't working well with my boolean variable. So, wrote a...