Help Center

Local Navigation

Using longs for unique identifiers

Use a long identifier instead of a String identifier for unique constants, such as GUIDs, hash table keys, and state or context identifiers.

For identifiers to remain unique across a BlackBerry® Java Application, use keys that an application generates based on a hash of a String. In the input String, include enough information to make the identifier unique. For example, use a fully qualified package name such as


Was this information helpful? Send us your comments.