ITP 109x Chapter 3: Basic Input/Ouput
Document Summary
Scanner text parser that can read numbers, words, or phrases from an input source i. e. a keyboard import java. util. scanner enables a program to read input scnr = new scanner(system. in) creates a scanner object, where system. in corresponds to keyboard input. Section 3. 03 string access operations index the position number of a string character, starting at 0 somestring. charat() determines the character at a particular index of a string somestring. length() number of characters in string variable. Concat(morestring) creates a new string that appends the string morestring at the end replace(findstr, replacestr) all occurrences of string will be replaced replace(findchar, replacechar) all occurrences of char will be replaced immutable the string"s characters cannot directly be modified. Section 3. 05 additional practice: health data (not applicable to notes) Section 3. 06 how methods work stack frame the new set of local variables created during a method call. Section 3. 07 java example: salary calculation (not applicable to notes) Section 3. 08 java example: married-couple names (not applicable to notes)