This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes break and continue statements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "break and continue statements" Watch "break and continue statements" New topic
Author

break and continue statements

Terry McKee
Ranch Hand

Joined: Sep 29, 2000
Posts: 173
Just had a quick question pertaining to break and continue statements. As I understand it, both continue and break statements can be used in loops (do..while, while..., and for statements). The statement break can also be used in the switch statement. Can break and/or continue statements be used in an if..else construct?
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Nope, you had it right. Also when studying for the exam, know how labels work with break and continue in the loops.
Terry McKee
Ranch Hand

Joined: Sep 29, 2000
Posts: 173
Thanks Bill.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: break and continue statements
 
Similar Threads
break and contine in blocks
return,continue,break keywords
Question from Khalid & Rolf
Question about Label
Which statements in Java cannot be labelled?