This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

switch and labeled break  RSS feed

 
Pawanpreet Singh
Ranch Hand
Posts: 264
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to know that can we use labeled switch as we use labled loops or a labeled body.

1) This is switch without label

2) switch with label, here break abc; statement should skip the default case also. The control should come out of swicth body but it comes out of for loop only. Please justify the both one.

[ August 27, 2005: Message edited by: Michael Ernest ]
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot break out of a case statement back to the original switch.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!