|
Delimiting Strings
A Programming Pattern |
|
Prof. David Bernstein
|
| Computer Science Department |
| bernstdh@jmu.edu |
String that contains
(and/or print) multiple items in a "collection" with a
delimiter between items (but not before the first or
after the last)String
object "Rain,Sleet,Snow" from
a String[] containing the three wordsString
"Rain, Sleet, and Snow")if
statement
"rain, sleet, and snow" rather than
"rain, sleet and snow"
", " as delim
", and " as lastdelim