java - How to stop JOptionPane from choosing last case? -


So this is a matter of shortening my case.

Suppose, we have a joicepan with 3 buttons.

  Boolean loopgmainfase = true; While (LoopGameInterface) {int selectGame = Geotepepan ... .. Switch (GameGail) {Case 0: Case 1: Case 2: System. EXT (0); }}  

The problem is, when I click the second button (for example), it goes in the case of 1. This is right. But when code is executed inside 1, then it goes straight to 2 and instead of parsing my game, I exit from my program?

You have to add break at the end of each case. This is true for all switch statements, and not when you are using a usagepaypane


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -