Java Reference
In-Depth Information
Exercise 13.5:
Write a method to convert strings containing decimal
numbers into comma-punctuated numbers, with a comma every third
digit from the right. For example, given the string
"1543729"
, the method
should return the string
"1,543,729"
.
Exercise 13.6:
Modify the method to accept parameters specifying the
separator character to use and the number of digits between separator
characters.