CS 0401 Lecture Notes - Lecture 5: Javadoc

46 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+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents