I'm wanting this code to jump out of the loop at case 2 of the switch statement

Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

I'm wanting this code to jump out of the loop at case 2 of the switch statement

For some reason it won't jump out of it.

System.out.println("\nWould you like to try to guess the number again?\n"+"1.Yes\n"+"2.No\n"+"3.Exit the System");
guessAgainPrompt=keyboard.nextInt();switch(guessAgainPrompt){case1:
guessNumber();
guessCount=+1;if(numberGuess==bonusNumber){
guessCorrect();
condition=false;}else{
guessFail();}break;case2:System.out.println("Thanks for playing the Game!");
condition=false;break;case3:System.out.println("Goodbye");
condition=false;break;}}while(guessCount<=5|| condition==true);

The loop will not end here, therefore, I am prompted with the prompt that is at the beginning of the loop.

if(numberGuess==bonusNumber){
condition=false;
guessCorrect();}

The variables that are controlling the loop is the 'condition variable, I have it initialised at the top as static boolean condition=true;
The loop is set to continue while the condition is true, but because the above condition is false, shouldn't it jump out?