Is it possible to have same hash code for two string objects having different values? If yes then please share some examples.
Here is a small sample of randomly generated examples of short strings with identical hash codes:
String 1 String 2 Common hash code
-------- -------- ----------------
VTBHKIGV - FLXCLLII -1242944431
FPESRBAH - GNFWMYVA 1778061647
UYDHRTXL - HGCNRCBE 1509241566
VXQMFMDE - YMYXDWKK -1553987354
VGWBSYRX - JZNQSUXK 700334696
Since multiple strings can share the same hash code, restoring the original from the hash is not possible.