You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 use java.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.
The text was updated successfully, but these errors were encountered:
I think there is one point about
toString()
which could be worth being mentioned in Item 12.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.
The text was updated successfully, but these errors were encountered: