8688327386 | while statement | -loop structure that executes a set of statements over and over based on a condition
while (condition) {
| 0 | |
8688327387 | do-while statement | -executes at least once
do {
| 1 | |
8688327388 | infinite loops | -if conditions never becomes false CAUSES: - syntax error -forgetting ending curly brace -logic error | 2 | |
8688327389 | overflow | occurs when there are not enough bits to store a number | 3 | |
8688327390 | counter | -incremented by a constant value useful for keeping track of number of times user makes a guess or types a password | 4 | |
8688327391 | accumulator | new value is added to the last value initialized and decalred | 5 | |
8688327392 | Sentinel, flag | constant that stores a value to signify that the loop should stop iterating | 6 | |
8688327393 | for statement | executes set of statements a fixed number of times
- for ( | 7 | |
8688327394 | loop control variable | a counter to control the iterations | 8 | |
8688327396 | increment operator | (i++) - increases value of a variable by 1. | 9 | |
8688327398 | break (or breakpoints) | points in code were execution will be suspended | 10 | |
8688327403 | string.length() | returns integer corresponding to number of characters in a string | 11 | |
8688327404 | string.substring(int, int); | returns substring of string, starts at sarting position and ends one character before end position | 12 | |
8688327405 | string.substring(int start); | returns substring which starts at start position and extends to rest of string | 13 | |
8688327406 | string.toLowerCase(); | returns copy of string with all lower case | 14 | |
8688327407 | string.toUpperCase(); | copy of string in all caps | 15 | |
8688327408 | string.trim(); | removes all leading and trailing spaces | 16 | |
8688327411 | index | position of character in string (starts at zero) | 17 | |
8688327414 | string.equals(String str); | returns TRUE when string is the same as str. returns FALSE otherwise | 18 | |
8688327415 | string.equalsIgnoreCase(); | same as equals() except differences in upper and lower cases are ignore | 19 | |
8688327416 | string.compareTo(String str); | -returns 0 when str is the same as the string. - negative number returned when str comes after the string alphabetically. - returns positive number when str comes before the string alphabetically. | 20 | |
8688327417 | string.compareToIgnoreCase(); | same as compareTo() except lower and upper case differences are ignored | 21 | |
8688327418 | string.indexOf(String str): | returns integer corresponding to the location of the first occurence of str in the string. Otherwise -1 is returned | 22 | |
8688327419 | string.lastIndexOf(String str); | returns integer corresponding to last occurence of str in the string. otherwise -1 is returned | 23 | |
8688327420 | string.startsWith(String str); | returns TRUE when string begins with str. returns false otherwise | 24 | |
8688327421 | string.endsWith(String.str); | returns true when string ends with str. returns false otherwise. | 25 | |
8688394473 | switch | a statement that matches a character or integer value to one of several possible cases. | 26 |
AP CSA Chapter 6 Flashcards
Primary tabs
Need Help?
We hope your visit has been a productive one. If you're having any problems, or would like to give some feedback, we'd love to hear from you.
For general help, questions, and suggestions, try our dedicated support forums.
If you need to contact the Course-Notes.Org web experience team, please use our contact form.
Need Notes?
While we strive to provide the most comprehensive notes for as many high school textbooks as possible, there are certainly going to be some that we miss. Drop us a note and let us know which textbooks you need. Be sure to include which edition of the textbook you are using! If we see enough demand, we'll do whatever we can to get those notes up on the site for you!