go to previous page   go to home page   go to next page

Answer:

It creates a string that has upper case characters where the original has lower case characters.


toUpperCase()

Upper Case Automaton

For example,

"Room with a View".toUpperCase()

results in the creation of a new string

"ROOM WITH A VIEW"

The finite-state transducer at right does this. Each state transition is labeled

input character(s) : output character

For example the label 'a':'A' means that if the current input character is a, make the state transition and output the character A. Ranges of characters are labeled like a-z : A-Z which means to make the state transition for a lower case letter and output the corresponding upper case letter.

Sometimes a transition is labeled:

input character(s) : action

This means to make the state transition for the indicated character(s) and perform the action.


QUESTION 3:

Are there times when you would want to output NO character, even though you have consumed an input character?