CS 0401 Lecture Notes - Lecture 5: Javadoc

44 views2 pages
30 Aug 2016
School
Course

Document Summary

When want it to stop when: roll == 7 || roll == point while (! (roll == 7 || roll == point)) Or, we can apply de morgan"s laws ( x || y ) -> (!x && !y) ( x && y) -> (!x || !y) Breaks break works inside of the body of a loop while (condition){ if (condition2) break; if there was any code below in the loop body is going to be skipped also will break out of the loop. Break means something different during a loop (do-while, while, for) than it does during switch cases. Continue works similarly but not identically to break while (condition){ if (condition2) continue; continue takes us back to the beginning of the loop skips any of the information after continue and goes back. Unlike with break, loop may continue with continue. \" prints out " in general, don"t need to escape apostrophes inside of strings.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents