Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch(int blaah) {
- case 1:
- some code here;
- break;
- case 2:
- myMethod();
- some code here;
- break;
- default:
- some code here;
- }
- public void myMethod() {
- if(boolean condition) {
- return;
- /*I want this return valuates in switch case too.
- so the switch case exit without executing the rest of code of "case 2" */
- }
- some code here;
- }
Add Comment
Please, Sign In to add comment