You can guarantee them to be the same object in memory by internalizing the strings. Other than that, there's no guarantee that they are (could be true, could not be true).

See: String (Java...