By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,967 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,967 IT Pros & Developers. It's quick & easy.

Can i use break(); and continue(); statement inside if loop?

Prakash Gnana
P: 25
Can i use break(); and continue(); statement inside if loop?
Feb 28 '11 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you canít. if is a condition, not a loop.
Feb 28 '11 #2

JKing
Expert 100+
P: 1,206
You may want to consider using a switch statement instead of an if statement because it does allow for breaking.
Feb 28 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.