-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
I think there is one point about toString()
which could be worth being mentioned in Item 12.
- You should not misuse
toString()
for displaying objects in a user interface, since that will preclude localization. Rather usejava.text.MessageFormat
or something similar for that purpose.
This is also highlighted in the text which says that phone numbers have a standard string representation. This "standard" is actually only valid in US, Canada and the other countries with country code 1. Elsewhere in the world, phone numbers looks different.
sriharshachilakapati
Metadata
Metadata
Assignees
Labels
No labels