Guest User

Untitled

a guest
Jul 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. switch(int blaah) {
  2. case 1:
  3. some code here;
  4. break;
  5. case 2:
  6. myMethod();
  7. some code here;
  8. break;
  9. default:
  10. some code here;
  11. }
  12.  
  13. public void myMethod() {
  14.  
  15. if(boolean condition) {
  16. return;
  17. /*I want this return valuates in switch case too.
  18. so the switch case exit without executing the rest of code of "case 2" */
  19.  
  20. }
  21. some code here;
  22. }
Add Comment
Please, Sign In to add comment