String Processing Flashcards
Which deprecated class splits a String into elements but does not support enhanced for iteration?
StringTokenizer
In a regular expression, which character indicates an optional subpattern that can match only once?
?
What does the format parameter %s specify?
String conversion
In a regular expression, which metacharacter specifies a word boundary?
\b
In a regular expression, which metacharacter specifies an upper/lowercase letter or digit?
\w
In a regular expression, which character indicates zero or more subpattern match?
*
In a format string, what does the % character specify?
The beginning of a format parameter
In a String, which character is required to escape the initial backslash for Java?
\
When using manipulation methods of the StringBuffer and StringBuilder class, how is the underlying String affected?
The underlying String is modified.
What does the format parameter %b specify?
Boolean conversion
When using the format parameter %b, which two values will convert to false?
false, null
Which String method accepts a regular expression and replacement string for each match, and returns a manipulated string?
replaceAll
Which Scanner method accepts a regular expression and returns the next match found in the source line?
findInLine
In a format string, what does the $ character specify?
the end of an argument location
What does “3” in format string %3.4s represent
Minimum number of characters to output.