IAT 265 Lecture Notes - Boolean Expression, For Loop, While Loop

70 views2 pages

Document Summary

Return type-specifies what type of value will be returned (void for nothing) Parameters-a list of variables with their type used in the method. Method body-the code that the method executes methodname(); is to call a method. Controls and loops if / else / switch statements. Boolean expressions are statements that can be either true or false. == equal note the difference between =, which is the assignment operator. If statements are used to allow your code to follow different paths depending on a condition. The concept is if the statement is true, do the following bit of code if ( boolean_expression ) else. Switch is a shortcut to using a long series of if-else statements. Once the case has been completed you break out of the block switch(valuetoswitchon){ case valuetomatch: //statements break; // end each case with a break statement case valuetomatch1:

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

Related Questions