This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

switch and labeled break

 
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