Some answers seem like they want to contradict each other, like the one by Eric, and the one by Jarrod. But they are in perfect agreement.
A constant must add meaning.
Defining COMMA to be a comma doesn't add meaning, because we know that a comma is a comma. Instead we destroy meaning, because now COMMA might actually not be a comma anymore.
If you use a comma for <purpose> you can declare <PURPOSE>a purpose and want to beuse a comma.
So while city + CharacterClass.COMMA + state is horribly wrongnamed constant, city + CITY_STATE_DELIMITER + state is acceptable. How acceptablename it is depends on many factors that are currently unknownafter it's purpose. Example:
city + CharacterClass.COMMA + state= badcity + CITY_STATE_DELIMITER + state= good
Use functions for formatting
I'dI personally prefer Format<PurposeOfFormat>FormatCityState(city, state) and wouldn'tdon't care about how the body of that function looks as long as it's short and passes the test cases. In other words, if you have to worry about using constants to implement formatting rules, you may consider to use functions for the formatting rules instead - that way the question about using constants inside these functions becomes so irrelevant that nobody has to care.