Changes the current bad word to newWord in the text.
Declaration Syntax
Parameters
- newWord (String)
- Replaces the current misspelt word.
Return Value
void
Exceptions
Exception | Condition |
---|---|
NoCurrentBadWordException | if nextBadWord() hasn't been run first AND found an erroneous word. |
ArgumentNullException | if newWord parameter is null. |