Quiz 6
Wednesday
With a piece of paper, write down your name and answers to the following questions.
What is the name of the character that separates tokens in a string?
- Separator
- Tokenizer
- Delimiter
- Terminator
The
startsWith
andendsWith
methods are members of which class?Char
Character
StringBuilder
String
Which
StringTokenizer
method returnstrue
if there are more tokens to be extracted from a string?moreTokens
tokensLeft
getToken
hasMoreTokens
Is the following statement correct, and why?
Character testing methods in the
Character
class, such asisLetter
, accept strings as arguments and test each character in the string.Answer: False, character testing methods in the
Character
class, such asisLetter
, acceptchar
type data as argumentsFind and correct the error in the following program.